1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-30 09:41:11 -05:00

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

Backport of #21593

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
KN4CK3R 2022-10-27 10:47:06 +02:00 committed by GitHub
parent 4869f9c3c8
commit 4d39fd8aae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}