From 3e77b57a720822e69bde84b84cae5c380705e600 Mon Sep 17 00:00:00 2001 From: Carlo Mandelli Date: Thu, 28 Jan 2021 16:04:42 +0100 Subject: [PATCH] fix: year outside of range error --- utils/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 756643e..b5e9c98 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -34,6 +34,9 @@ func BookMarkType(a int64) string { func TimeStampFormat(stamp int64) time.Time { s1 := time.Unix(stamp, 0) + if s1.Local().Year() > 9999 { + return time.Date(9999, 12, 13, 23, 59, 59, 0, time.Local) + } return s1 }