Merge pull request #61 from camandel/fix_expiry_date_error

Fix "year outside of range" error getting cookies on Firefox
ᴍᴏᴏɴD4ʀᴋ 5 years ago committed by GitHub
commit 5ce03c855a
  1. 3
      utils/utils.go

@ -34,6 +34,9 @@ func BookMarkType(a int64) string {
func TimeStampFormat(stamp int64) time.Time { func TimeStampFormat(stamp int64) time.Time {
s1 := time.Unix(stamp, 0) s1 := time.Unix(stamp, 0)
if s1.Local().Year() > 9999 {
return time.Date(9999, 12, 13, 23, 59, 59, 0, time.Local)
}
return s1 return s1
} }

Loading…
Cancel
Save