We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 925c91c + ea7e17c commit e2fb9b2Copy full SHA for e2fb9b2
internal/timeutil/time.go
@@ -19,14 +19,14 @@ var unix = time.Unix(0, 0)
19
20
// UnmarshalInterval up to ±292 years.
21
func UnmarshalInterval(n int64) time.Duration {
22
- return time.Millisecond * time.Duration(n)
+ return time.Duration(n)
23
}
24
25
func MarshalInterval(d time.Duration) int64 {
26
- return d.Microseconds()
+ return int64(d)
27
28
29
-// Up to 11761191-01-20 00:00:00 +0000 UTC.
+// UnmarshalDate up to 11761191-01-20 00:00:00 +0000 UTC.
30
func UnmarshalDate(n uint32) time.Time {
31
return time.Unix(int64(n)*secondsPerDay, 0)
32
0 commit comments