diff --git a/time.go b/time.go index a14870e..cd72f35 100644 --- a/time.go +++ b/time.go @@ -183,7 +183,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) { case float64: return time.UnixMilli(int64(math.Floor(v))).UTC(), nil case int64: - return time.UnixMilli(int64(v)).UTC(), nil + return time.UnixMilli(v).UTC(), nil default: return time.Time{}, util.TimeErr } @@ -200,7 +200,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) { case float64: return time.UnixMicro(int64(math.Floor(v))).UTC(), nil case int64: - return time.UnixMicro(int64(v)).UTC(), nil + return time.UnixMicro(v).UTC(), nil default: return time.Time{}, util.TimeErr } @@ -217,7 +217,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) { case float64: return time.Unix(0, int64(math.Floor(v))).UTC(), nil case int64: - return time.Unix(0, int64(v)).UTC(), nil + return time.Unix(0, v).UTC(), nil default: return time.Time{}, util.TimeErr } diff --git a/vtab_test.go b/vtab_test.go index 69c4a4b..1686c23 100644 --- a/vtab_test.go +++ b/vtab_test.go @@ -116,5 +116,5 @@ func (cur *seriesCursor) EOF() bool { } func (cur *seriesCursor) RowID() (int64, error) { - return int64(cur.value), nil + return cur.value, nil }