Skip to content

Commit a77ccfb

Browse files
committed
avoid utils.Now failing in sometime around the year 2262
1 parent cf91430 commit a77ccfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/now_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ func Now() time.Time {
1515
return time.Now()
1616
}
1717

18-
return time.Unix(0, syscall.TimevalToNsec(tv))
18+
return time.Unix(tv.Sec, tv.Usec*1000)
1919
}

0 commit comments

Comments
 (0)