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

[Typing] Rename DateTime to TIMESTAMP_TZ #916

Merged
merged 2 commits into from
Sep 19, 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 clients/bigquery/converters/converters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestStringConverter_Convert(t *testing.T) {
}
{
// Extended time
val, err := converter.Convert(ext.NewExtendedTime(time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC), ext.DateTimeKindType, ""))
val, err := converter.Convert(ext.NewExtendedTime(time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC), ext.TimestampTzKindType, ""))
assert.NoError(t, err)
assert.Equal(t, "2021-01-01T00:00:00Z", val)
}
Expand Down
4 changes: 2 additions & 2 deletions clients/bigquery/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (BigQueryDialect) DataTypeForKind(kindDetails typing.KindDetails, _ bool) s
return "json"
case typing.ETime.Kind:
switch kindDetails.ExtendedTimeDetails.Type {
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
// https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_type
// We should be using TIMESTAMP since it's an absolute point in time.
return "timestamp"
Expand Down Expand Up @@ -104,7 +104,7 @@ func (BigQueryDialect) KindForDataType(rawBqType string, _ string) (typing.KindD
case "array":
return typing.Array, nil
case "datetime", "timestamp":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType), nil
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType), nil
case "time":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType), nil
case "date":
Expand Down
6 changes: 3 additions & 3 deletions clients/bigquery/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func TestBigQueryDialect_KindForDataType(t *testing.T) {
"record": typing.Struct,
"json": typing.Struct,
// Datetime
"datetime": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"timestamp": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"datetime": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
"timestamp": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
"time": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType),
"date": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateKindType),
//Invalid
Expand Down Expand Up @@ -125,7 +125,7 @@ func TestBigQueryDialect_KindForDataType(t *testing.T) {

func TestBigQueryDialect_KindForDataType_NoDataLoss(t *testing.T) {
kindDetails := []typing.KindDetails{
typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateKindType),
typing.String,
Expand Down
4 changes: 2 additions & 2 deletions clients/bigquery/storagewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func columnToTableFieldSchema(column columns.Column) (*storagepb.TableFieldSchem
fieldType = storagepb.TableFieldSchema_TIME
case ext.DateKindType:
fieldType = storagepb.TableFieldSchema_DATE
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
fieldType = storagepb.TableFieldSchema_TIMESTAMP
default:
return nil, fmt.Errorf("unsupported extended time details type: %q", column.KindDetails.ExtendedTimeDetails.Type)
Expand Down Expand Up @@ -185,7 +185,7 @@ func rowToMessage(row map[string]any, columns []columns.Column, messageDescripto
case ext.DateKindType:
daysSinceEpoch := extTime.GetTime().Unix() / (60 * 60 * 24)
message.Set(field, protoreflect.ValueOfInt32(int32(daysSinceEpoch)))
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
if err := timestamppb.New(extTime.GetTime()).CheckValid(); err != nil {
return nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions clients/bigquery/storagewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func TestColumnToTableFieldSchema(t *testing.T) {
assert.Equal(t, storagepb.TableFieldSchema_DATE, fieldSchema.Type)
}
{
// ETime - DateTime:
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType)))
// ETime - TimestampTz:
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType)))
assert.NoError(t, err)
assert.Equal(t, storagepb.TableFieldSchema_TIMESTAMP, fieldSchema.Type)
}
Expand Down Expand Up @@ -114,7 +114,7 @@ func TestRowToMessage(t *testing.T) {
columns.NewColumn("c_string_decimal", typing.String),
columns.NewColumn("c_time", typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType)),
columns.NewColumn("c_date", typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateKindType)),
columns.NewColumn("c_datetime", typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType)),
columns.NewColumn("c_datetime", typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType)),
columns.NewColumn("c_struct", typing.Struct),
columns.NewColumn("c_array", typing.Array),
}
Expand All @@ -134,7 +134,7 @@ func TestRowToMessage(t *testing.T) {
"c_string_decimal": decimal.NewDecimal(numbers.MustParseDecimal("1.61803")),
"c_time": ext.NewExtendedTime(time.Date(0, 0, 0, 4, 5, 6, 7, time.UTC), ext.TimeKindType, ""),
"c_date": ext.NewExtendedTime(time.Date(2001, 2, 3, 0, 0, 0, 0, time.UTC), ext.DateKindType, ""),
"c_datetime": ext.NewExtendedTime(time.Date(2001, 2, 3, 4, 5, 6, 7, time.UTC), ext.DateTimeKindType, ""),
"c_datetime": ext.NewExtendedTime(time.Date(2001, 2, 3, 4, 5, 6, 7, time.UTC), ext.TimestampTzKindType, ""),
"c_struct": map[string]any{"baz": []string{"foo", "bar"}},
"c_array": []string{"foo", "bar"},
}
Expand Down
4 changes: 2 additions & 2 deletions clients/mssql/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (MSSQLDialect) DataTypeForKind(kindDetails typing.KindDetails, isPk bool) s
return "BIT"
case typing.ETime.Kind:
switch kindDetails.ExtendedTimeDetails.Type {
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
// Using datetime2 because it's the recommendation, and it provides more precision: https://stackoverflow.com/a/1884088
return "datetime2"
case ext.DateKindType:
Expand Down Expand Up @@ -114,7 +114,7 @@ func (MSSQLDialect) KindForDataType(rawType string, stringPrecision string) (typ
case
"datetime",
"datetime2":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType), nil
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType), nil
case "time":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType), nil
case "date":
Expand Down
4 changes: 2 additions & 2 deletions clients/mssql/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func TestMSSQLDialect_KindForDataType(t *testing.T) {
"bit": typing.Boolean,
"date": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateKindType),
"time": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType),
"datetime": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"datetime2": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"datetime": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
"datetime2": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
}

for col, expectedKind := range colToExpectedKind {
Expand Down
4 changes: 2 additions & 2 deletions clients/redshift/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (RedshiftDialect) DataTypeForKind(kd typing.KindDetails, _ bool) string {
return "BOOLEAN NULL"
case typing.ETime.Kind:
switch kd.ExtendedTimeDetails.Type {
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
return "timestamp with time zone"
case ext.DateKindType:
return "date"
Expand Down Expand Up @@ -92,7 +92,7 @@ func (RedshiftDialect) KindForDataType(rawType string, stringPrecision string) (
case "double precision":
return typing.Float, nil
case "timestamp with time zone", "timestamp without time zone":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType), nil
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType), nil
case "time without time zone":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType), nil
case "date":
Expand Down
4 changes: 2 additions & 2 deletions clients/redshift/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ func TestRedshiftDialect_KindForDataType(t *testing.T) {
kd, err := dialect.KindForDataType("timestamp with time zone", "")
assert.NoError(t, err)
assert.Equal(t, typing.ETime.Kind, kd.Kind)
assert.Equal(t, ext.DateTimeKindType, kd.ExtendedTimeDetails.Type)
assert.Equal(t, ext.TimestampTzKindType, kd.ExtendedTimeDetails.Type)
}
{
kd, err := dialect.KindForDataType("timestamp without time zone", "")
assert.NoError(t, err)
assert.Equal(t, typing.ETime.Kind, kd.Kind)
assert.Equal(t, ext.DateTimeKindType, kd.ExtendedTimeDetails.Type)
assert.Equal(t, ext.TimestampTzKindType, kd.ExtendedTimeDetails.Type)
}
{
kd, err := dialect.KindForDataType("time without time zone", "")
Expand Down
4 changes: 2 additions & 2 deletions clients/shared/default_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var dialects = []sql.Dialect{

func TestColumn_DefaultValue(t *testing.T) {
birthday := time.Date(2022, time.September, 6, 3, 19, 24, 942000000, time.UTC)
birthdayExtDateTime, err := ext.ParseExtendedDateTime(birthday.Format(ext.ISO8601), ext.DateTimeKindType)
birthdayExtDateTime, err := ext.ParseExtendedDateTime(birthday.Format(ext.ISO8601), ext.TimestampTzKindType)
assert.NoError(t, err)

// date
Expand All @@ -36,7 +36,7 @@ func TestColumn_DefaultValue(t *testing.T) {
timeKind.ExtendedTimeDetails = &ext.Time
// date time
dateTimeKind := typing.ETime
dateTimeKind.ExtendedTimeDetails = &ext.DateTime
dateTimeKind.ExtendedTimeDetails = &ext.TimestampTz

testCases := []struct {
name string
Expand Down
6 changes: 3 additions & 3 deletions clients/snowflake/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *SnowflakeTestSuite) TestMutateColumnsWithMemoryCacheDeletions() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down Expand Up @@ -58,7 +58,7 @@ func (s *SnowflakeTestSuite) TestShouldDeleteColumn() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down Expand Up @@ -97,7 +97,7 @@ func (s *SnowflakeTestSuite) TestManipulateShouldDeleteColumn() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down
4 changes: 2 additions & 2 deletions clients/snowflake/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (SnowflakeDialect) DataTypeForKind(kindDetails typing.KindDetails, _ bool)
return "boolean"
case typing.ETime.Kind:
switch kindDetails.ExtendedTimeDetails.Type {
case ext.DateTimeKindType:
case ext.TimestampTzKindType:
// We are not using `TIMESTAMP_NTZ` because Snowflake does not join on this data very well.
// It ends up trying to parse this data into a TIMESTAMP_TZ and messes with the join order.
// Specifically, if my location is in SF, it'll try to parse TIMESTAMP_NTZ into PST then into UTC.
Expand Down Expand Up @@ -100,7 +100,7 @@ func (SnowflakeDialect) KindForDataType(snowflakeType string, _ string) (typing.
case "array":
return typing.Array, nil
case "datetime", "timestamp", "timestamp_ltz", "timestamp_ntz", "timestamp_tz":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType), nil
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType), nil
case "time":
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType), nil
case "date":
Expand Down
4 changes: 2 additions & 2 deletions clients/snowflake/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ func TestSnowflakeDialect_KindForDataType_DateTime(t *testing.T) {
for _, expectedDateTime := range expectedDateTimes {
kd, err := SnowflakeDialect{}.KindForDataType(expectedDateTime, "")
assert.NoError(t, err)
assert.Equal(t, ext.DateTime.Type, kd.ExtendedTimeDetails.Type, expectedDateTime)
assert.Equal(t, ext.TimestampTz.Type, kd.ExtendedTimeDetails.Type, expectedDateTime)
}
}

func TestSnowflakeDialect_KindForDataType_NoDataLoss(t *testing.T) {
kindDetails := []typing.KindDetails{
typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType),
typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateKindType),
typing.String,
Expand Down
2 changes: 1 addition & 1 deletion clients/snowflake/snowflake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (s *SnowflakeTestSuite) TestExecuteMergeDeletionFlagRemoval() {

snowflakeColToKindDetailsMap := map[string]typing.KindDetails{
"id": typing.Integer,
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType),
"created_at": typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType),
"name": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeleteColumnMarker: typing.Boolean,
Expand Down
4 changes: 2 additions & 2 deletions lib/cdc/mongo/debezium.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ func (s *SchemaEventPayload) GetData(pkMap map[string]any, tc kafkalib.TopicConf
}

if tc.IncludeArtieUpdatedAt {
retMap[constants.UpdateColumnMarker] = ext.NewExtendedTime(time.Now().UTC(), ext.DateTimeKindType, ext.ISO8601)
retMap[constants.UpdateColumnMarker] = ext.NewExtendedTime(time.Now().UTC(), ext.TimestampTzKindType, ext.ISO8601)
}

if tc.IncludeDatabaseUpdatedAt {
retMap[constants.DatabaseUpdatedColumnMarker] = ext.NewExtendedTime(s.GetExecutionTime(), ext.DateTimeKindType, ext.ISO8601)
retMap[constants.DatabaseUpdatedColumnMarker] = ext.NewExtendedTime(s.GetExecutionTime(), ext.TimestampTzKindType, ext.ISO8601)
}

return retMap, nil
Expand Down
2 changes: 1 addition & 1 deletion lib/cdc/mongo/debezium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (m *MongoTestSuite) TestMongoDBEventCustomer() {
evtDataWithIncludedAt, err = evt.GetData(map[string]any{"_id": 1003}, kafkalib.TopicConfig{IncludeDatabaseUpdatedAt: true, IncludeArtieUpdatedAt: true})
assert.NoError(m.T(), err)

assert.Equal(m.T(), ext.NewExtendedTime(time.Date(2022, time.November, 18, 6, 35, 21, 0, time.UTC), ext.DateTimeKindType, ext.ISO8601), evtDataWithIncludedAt[constants.DatabaseUpdatedColumnMarker])
assert.Equal(m.T(), ext.NewExtendedTime(time.Date(2022, time.November, 18, 6, 35, 21, 0, time.UTC), ext.TimestampTzKindType, ext.ISO8601), evtDataWithIncludedAt[constants.DatabaseUpdatedColumnMarker])

updatedExtTime, isOk := evtDataWithIncludedAt[constants.UpdateColumnMarker].(*ext.ExtendedTime)
assert.True(m.T(), isOk)
Expand Down
6 changes: 3 additions & 3 deletions lib/cdc/relational/debezium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *RelationTestSuite) TestPostgresEvent() {
evtData, err := evt.GetData(map[string]any{"id": 59}, kafkalib.TopicConfig{IncludeDatabaseUpdatedAt: true})
assert.NoError(r.T(), err)
assert.Equal(r.T(), float64(59), evtData["id"])
assert.Equal(r.T(), ext.NewExtendedTime(time.Date(2022, time.November, 16, 4, 1, 53, 308000000, time.UTC), ext.DateTimeKindType, ext.ISO8601), evtData[constants.DatabaseUpdatedColumnMarker])
assert.Equal(r.T(), ext.NewExtendedTime(time.Date(2022, time.November, 16, 4, 1, 53, 308000000, time.UTC), ext.TimestampTzKindType, ext.ISO8601), evtData[constants.DatabaseUpdatedColumnMarker])

assert.Equal(r.T(), "Barings Participation Investors", evtData["item"])
assert.Equal(r.T(), map[string]any{"object": "foo"}, evtData["nested"])
Expand Down Expand Up @@ -208,7 +208,7 @@ func (r *RelationTestSuite) TestPostgresEventWithSchemaAndTimestampNoTZ() {
r.T(),
ext.NewExtendedTime(
time.Date(2023, time.February, 2, 17, 51, 35, 175445*1000, time.UTC),
ext.DateTimeKindType, ext.RFC3339Microsecond,
ext.TimestampTzKindType, ext.RFC3339Microsecond,
),
evtData["ts_no_tz1"],
)
Expand Down Expand Up @@ -534,7 +534,7 @@ func (r *RelationTestSuite) TestGetEventFromBytes_MySQL() {
evtData, err = evt.GetData(kvMap, kafkalib.TopicConfig{IncludeDatabaseUpdatedAt: true, IncludeArtieUpdatedAt: true})
assert.NoError(r.T(), err)

assert.Equal(r.T(), ext.NewExtendedTime(time.Date(2023, time.March, 13, 19, 19, 24, 0, time.UTC), ext.DateTimeKindType, ext.ISO8601), evtData[constants.DatabaseUpdatedColumnMarker])
assert.Equal(r.T(), ext.NewExtendedTime(time.Date(2023, time.March, 13, 19, 19, 24, 0, time.UTC), ext.TimestampTzKindType, ext.ISO8601), evtData[constants.DatabaseUpdatedColumnMarker])

updatedAtExtTime, isOk := evtData[constants.UpdateColumnMarker].(*ext.ExtendedTime)
assert.True(r.T(), isOk)
Expand Down
4 changes: 2 additions & 2 deletions lib/cdc/util/relational_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ func (s *SchemaEventPayload) GetData(pkMap map[string]any, tc kafkalib.TopicConf
}

if tc.IncludeArtieUpdatedAt {
retMap[constants.UpdateColumnMarker] = ext.NewExtendedTime(time.Now().UTC(), ext.DateTimeKindType, ext.ISO8601)
retMap[constants.UpdateColumnMarker] = ext.NewExtendedTime(time.Now().UTC(), ext.TimestampTzKindType, ext.ISO8601)
}

if tc.IncludeDatabaseUpdatedAt {
retMap[constants.DatabaseUpdatedColumnMarker] = ext.NewExtendedTime(s.GetExecutionTime(), ext.DateTimeKindType, ext.ISO8601)
retMap[constants.DatabaseUpdatedColumnMarker] = ext.NewExtendedTime(s.GetExecutionTime(), ext.TimestampTzKindType, ext.ISO8601)
}

return retMap, nil
Expand Down
4 changes: 2 additions & 2 deletions lib/debezium/converters/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var SupportedDateTimeWithTimezoneFormats = []string{
type DateTimeWithTimezone struct{}

func (DateTimeWithTimezone) ToKindDetails() typing.KindDetails {
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.DateTimeKindType)
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType)
}

func (DateTimeWithTimezone) Convert(value any) (any, error) {
Expand All @@ -97,7 +97,7 @@ func (DateTimeWithTimezone) Convert(value any) (any, error) {
for _, supportedFormat := range SupportedDateTimeWithTimezoneFormats {
ts, err = ext.ParseTimeExactMatch(supportedFormat, valString)
if err == nil {
return ext.NewExtendedTime(ts, ext.DateTimeKindType, supportedFormat), nil
return ext.NewExtendedTime(ts, ext.TimestampTzKindType, supportedFormat), nil
}
}

Expand Down
Loading