diff --git a/lib/debezium/converters/time.go b/lib/debezium/converters/time.go index 73b903ae..62cd761e 100644 --- a/lib/debezium/converters/time.go +++ b/lib/debezium/converters/time.go @@ -91,7 +91,7 @@ func (TimestampConverter) Convert(value any) (any, error) { return nil, nil } - return timeValue, nil + return timeValue.Format(time.RFC3339Nano), nil } type YearConverter struct{} diff --git a/lib/debezium/converters/time_test.go b/lib/debezium/converters/time_test.go index 8ff6a54f..a5a142eb 100644 --- a/lib/debezium/converters/time_test.go +++ b/lib/debezium/converters/time_test.go @@ -144,7 +144,7 @@ func TestTimestampConverter_Convert(t *testing.T) { // time.Time value, err := converter.Convert(time.Date(2001, 2, 3, 4, 5, 0, 0, time.UTC)) assert.NoError(t, err) - assert.Equal(t, time.Date(2001, 2, 3, 4, 5, 0, 0, time.UTC), value) + assert.Equal(t, "2001-02-03T04:05:00Z", value) } }