diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-10-27 10:47:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 10:47:06 +0200 |
commit | 4d39fd8aaec48d99d845b877b94ee58763ccccab (patch) | |
tree | 5294dd4bc09a8dac7ed85d517c5eaad480365de8 | |
parent | Revert: auto generate INTERNAL_TOKEN (#21608) (#21609) (diff) | |
download | forgejo-4d39fd8aaec48d99d845b877b94ee58763ccccab.tar.xz forgejo-4d39fd8aaec48d99d845b877b94ee58763ccccab.zip |
Fix `Timestamp.IsZero` (#21593) (#21603)
Backport of #21593
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-rw-r--r-- | modules/timeutil/timestamp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/timeutil/timestamp.go b/modules/timeutil/timestamp.go index 40fcb8603f..36b2aff575 100644 --- a/modules/timeutil/timestamp.go +++ b/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 } |