Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[go] Include MS for ISO8601. #515

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cdc/postgres/debezium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *PostgresTestSuite) TestPostgresEvent() {
})
assert.NoError(p.T(), err)
assert.Equal(p.T(), float64(59), evtData["id"])
assert.Equal(p.T(), "2022-11-16T04:01:53+00:00", evtData[constants.DatabaseUpdatedColumnMarker])
assert.Equal(p.T(), "2022-11-16T04:01:53.308+00:00", evtData[constants.DatabaseUpdatedColumnMarker])

assert.Equal(p.T(), "Barings Participation Investors", evtData["item"])
assert.Equal(p.T(), map[string]any{"object": "foo"}, evtData["nested"])
Expand Down
4 changes: 2 additions & 2 deletions lib/typing/columns/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestColumn_DefaultValue(t *testing.T) {
args: &DefaultValueArgs{
Escape: true,
},
expectedValue: "'03:19:24'",
expectedValue: "'03:19:24.942'",
},
{
name: "datetime",
Expand All @@ -138,7 +138,7 @@ func TestColumn_DefaultValue(t *testing.T) {
args: &DefaultValueArgs{
Escape: true,
},
expectedValue: "'2022-09-06T03:19:24Z'",
expectedValue: "'2022-09-06T03:19:24.942Z'",
},
}

Expand Down
2 changes: 1 addition & 1 deletion lib/typing/ext/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "time"

const (
BigQueryDateTimeFormat = "2006-01-02 15:04:05.999999"
ISO8601 = "2006-01-02T15:04:05-07:00"
ISO8601 = "2006-01-02T15:04:05.999-07:00"
PostgresDateFormat = "2006-01-02"
PostgresTimeFormat = "15:04:05.999999-07" // microsecond precision
AdditionalTimeFormat = "15:04:05.999999Z07"
Expand Down