From b0a057f1c05c539eed39fbc53f1578fc159259e0 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Thu, 27 Oct 2022 10:47:47 +0200 Subject: [PATCH] Fix `Timestamp.IsZero` (#21593) (#21604) Backport of #21593 Co-authored-by: Lunny Xiao --- modules/timeutil/timestamp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/timeutil/timestamp.go b/modules/timeutil/timestamp.go index 9c421914cb..d2a5fec507 100644 --- a/modules/timeutil/timestamp.go +++ b/modules/timeutil/timestamp.go @@ -103,5 +103,5 @@ func (ts TimeStamp) FormatDate() string { // IsZero is zero time func (ts TimeStamp) IsZero() bool { - return ts.AsTimeInLocation(time.Local).IsZero() + return int64(ts) == 0 }