Skip to content

Commit

Permalink
Fix Timestamp.IsZero (#21593) (#21603)
Browse files Browse the repository at this point in the history
Backport of #21593

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
KN4CK3R and lunny committed Oct 27, 2022
1 parent 4869f9c commit 4d39fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/timeutil/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 4d39fd8

Please sign in to comment.