1
0
Fork 0
forked from forgejo/forgejo

fix gpg expired bug when time is zero (#3584)

This commit is contained in:
Lunny Xiao 2018-02-26 18:25:45 +08:00 committed by Lauris BH
parent 521945a2d2
commit 769ab1e424
2 changed files with 6 additions and 1 deletions

View file

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