From 4d39fd8aaec48d99d845b877b94ee58763ccccab Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Thu, 27 Oct 2022 10:47:06 +0200 Subject: [PATCH] Fix `Timestamp.IsZero` (#21593) (#21603) 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 40fcb8603f..36b2aff575 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 }