Skip to content

Commit

Permalink
Aligning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jul 24, 2024
1 parent 44d8b28 commit 8629f11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration_tests/postgres/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ const expectedPayloadTemplate = `{
"c_serial": 1000000123,
"c_smallint": 32767,
"c_text": "QWERTYUIOP",
"c_time_with_timezone": "10:34:17.746572",
"c_time_with_timezone": "10:34:17.746572Z",
"c_time_without_timezone": 45296000,
"c_timestamp_with_timezone": "2001-02-16T13:38:40Z",
"c_timestamp_without_timezone": 982355920000000,
Expand Down
2 changes: 1 addition & 1 deletion sources/postgres/adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestValueConverterForType_Convert(t *testing.T) {
name: "time with time zone (postgres.Date)",
col: schema.Column{Name: "t_w_tz", Type: schema.TimeWithTimeZone},
value: "12:00:00.123456+07",
expectedValue: "05:00:00.123456",
expectedValue: "05:00:00.123456Z",
},
{
name: "numeric (postgres.Numeric)",
Expand Down
3 changes: 1 addition & 2 deletions sources/postgres/adapter/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/artie-labs/reader/lib/timeutil"
"github.com/artie-labs/transfer/lib/debezium"
"github.com/artie-labs/transfer/lib/typing/ext"
"github.com/jackc/pgx/v5/pgtype"
)

Expand Down Expand Up @@ -41,7 +40,7 @@ func (TimeWithTimezoneConverter) Convert(value any) (any, error) {

// Convert `time.Time` into GMT
// Then convert back into a string with ns precision
return timeValue.UTC().Format(ext.PostgresTimeFormatNoTZ), nil
return timeValue.UTC().Format("15:04:05.000000Z"), nil
}

type PgTimeConverter struct{}
Expand Down

0 comments on commit 8629f11

Please sign in to comment.