Skip to content

Commit 4d39fd8

Browse files
KN4CK3Rlunny
andauthored
Fix Timestamp.IsZero (#21593) (#21603)
Backport of #21593 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 4869f9c commit 4d39fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/timeutil/timestamp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ func (ts TimeStamp) FormatDate() string {
103103

104104
// IsZero is zero time
105105
func (ts TimeStamp) IsZero() bool {
106-
return ts.AsTimeInLocation(time.Local).IsZero()
106+
return int64(ts) == 0
107107
}

0 commit comments

Comments
 (0)