Skip to content

Commit

Permalink
fix: support larger time range
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Wilkins <[email protected]>
  • Loading branch information
kruskall and axw authored Aug 9, 2023
1 parent 6d660f6 commit 53a18e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/modelpb/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ func FromTime(t time.Time) uint64 {

// ToTime converts uint64 nanoseconds since Unix epoch to a time.Time.
func ToTime(v uint64) time.Time {
return time.Unix(0, int64(v)).UTC()
return time.Unix(int64(v/uint64(time.Second)), int64(v%uint64(time.Second))).UTC()
}

0 comments on commit 53a18e6

Please sign in to comment.