diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-02-26 18:25:45 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-02-26 12:25:45 +0200 |
commit | 769ab1e4240f820efdb231832cb7957cb4902807 (patch) | |
tree | d6bd9f8fe9beea000c78cfb7d1030d848c30ad44 /modules/util | |
parent | 521945a2d2af421f365b5ed368833f0eb62bc0b9 (diff) | |
download | gitea-769ab1e4240f820efdb231832cb7957cb4902807.tar.gz gitea-769ab1e4240f820efdb231832cb7957cb4902807.zip |
fix gpg expired bug when time is zero (#3584)
Diffstat (limited to 'modules/util')
-rw-r--r-- | modules/util/time_stamp.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/util/time_stamp.go b/modules/util/time_stamp.go index a03560b24f..56f41882f5 100644 --- a/modules/util/time_stamp.go +++ b/modules/util/time_stamp.go @@ -59,3 +59,8 @@ func (ts TimeStamp) FormatLong() string { func (ts TimeStamp) FormatShort() string { return ts.Format("Jan 02, 2006") } + +// IsZero is zero time +func (ts TimeStamp) IsZero() bool { + return ts.AsTime().IsZero() +} |