Skip to content

Commit ea7e17c

Browse files
committed
revert time.Duration <-> int64 convertation
1 parent 925c91c commit ea7e17c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/timeutil/time.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ var unix = time.Unix(0, 0)
1919

2020
// UnmarshalInterval up to ±292 years.
2121
func UnmarshalInterval(n int64) time.Duration {
22-
return time.Millisecond * time.Duration(n)
22+
return time.Duration(n)
2323
}
2424

2525
func MarshalInterval(d time.Duration) int64 {
26-
return d.Microseconds()
26+
return int64(d)
2727
}
2828

29-
// Up to 11761191-01-20 00:00:00 +0000 UTC.
29+
// UnmarshalDate up to 11761191-01-20 00:00:00 +0000 UTC.
3030
func UnmarshalDate(n uint32) time.Time {
3131
return time.Unix(int64(n)*secondsPerDay, 0)
3232
}

0 commit comments

Comments
 (0)