Skip to content

Commit

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

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
KN4CK3R and lunny authored Oct 27, 2022
1 parent 43a8547 commit b0a057f
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 b0a057f

Please sign in to comment.