Fix `Timestamp.IsZero` (#21593) (#21603)

Backport of #21593

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tokarchuk/v1.18
KN4CK3R 2 years ago committed by GitHub
parent 4869f9c3c8
commit 4d39fd8aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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
}

Loading…
Cancel
Save