diff --git a/pkg/schema/field/timestamp.go b/pkg/schema/field/timestamp.go index 7626639a6021826140f8e719a81cdfa203980642..29b2991232ec2c75e41bd3ee687fddca27da0887 100644 --- a/pkg/schema/field/timestamp.go +++ b/pkg/schema/field/timestamp.go @@ -37,9 +37,11 @@ func (TimestampType) Decode(_ context.Context, _ *Field, v interface{}) (interfa if err == nil { return duration.Nanoseconds(), nil } + zeroTime := time.Time{} t, err := time.Parse(time.TimeOnly, i) + if err == nil { - return t.Sub(time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())).Nanoseconds(), nil + return t.AddDate(1, 0, 0).Sub(zeroTime).Nanoseconds(), nil } return nil, err default: