diff --git a/flow/connectors/postgres/qvalue_convert.go b/flow/connectors/postgres/qvalue_convert.go index 830d9b8450..01ddfadcfa 100644 --- a/flow/connectors/postgres/qvalue_convert.go +++ b/flow/connectors/postgres/qvalue_convert.go @@ -234,19 +234,7 @@ func parseFieldFromQValueKind(qvalueKind qvalue.QValueKind, value interface{}) ( case qvalue.QValueKindTime: timeVal := value.(pgtype.Time) if timeVal.Valid { - var timeValStr any - timeValStr, err := timeVal.Value() - if err != nil { - return qvalue.QValue{}, fmt.Errorf("failed to parse time: %w", err) - } - // edge case, only Postgres supports this extreme value for time - timeValStr = strings.Replace(timeValStr.(string), "24:00:00.000000", "23:59:59.999999", 1) - t, err := time.Parse("15:04:05.999999", timeValStr.(string)) - t = t.AddDate(1970, 0, 0) - if err != nil { - return qvalue.QValue{}, fmt.Errorf("failed to parse time: %w", err) - } - val = qvalue.QValue{Kind: qvalue.QValueKindTime, Value: t} + val = qvalue.QValue{Kind: qvalue.QValueKindTime, Value: time.UnixMicro(timeVal.Microseconds)} } case qvalue.QValueKindTimeTZ: timeVal := value.(string)