Skip to content

Commit 4b78d28

Browse files
authored
Fix ExecutionTime rounding when using PostgreSQL (#3952)
1 parent 654bc3f commit 4b78d28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

common/persistence/sql/sqlplugin/postgresql/visibility.go

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func (pdb *db) InsertIntoVisibility(
137137
row *sqlplugin.VisibilityRow,
138138
) (sql.Result, error) {
139139
row.StartTime = pdb.converter.ToPostgreSQLDateTime(row.StartTime)
140+
row.ExecutionTime = pdb.converter.ToPostgreSQLDateTime(row.ExecutionTime)
140141
return pdb.conn.ExecContext(ctx,
141142
templateCreateWorkflowExecutionStarted,
142143
row.NamespaceID,
@@ -160,6 +161,7 @@ func (pdb *db) ReplaceIntoVisibility(
160161
switch {
161162
case row.CloseTime != nil && row.HistoryLength != nil:
162163
row.StartTime = pdb.converter.ToPostgreSQLDateTime(row.StartTime)
164+
row.ExecutionTime = pdb.converter.ToPostgreSQLDateTime(row.ExecutionTime)
163165
closeTime := pdb.converter.ToPostgreSQLDateTime(*row.CloseTime)
164166
return pdb.conn.ExecContext(ctx,
165167
templateCreateWorkflowExecutionClosed,

0 commit comments

Comments
 (0)