From 53a18e60dd40a51ec5ad0db42fe7628a41e73f10 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:55:16 +0200 Subject: [PATCH] fix: support larger time range Co-authored-by: Andrew Wilkins --- model/modelpb/timestamp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/modelpb/timestamp.go b/model/modelpb/timestamp.go index 63c5cab2..012594d4 100644 --- a/model/modelpb/timestamp.go +++ b/model/modelpb/timestamp.go @@ -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() }