mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-18 06:58:19 +00:00
fix gpg expired bug when time is zero (#3584)
This commit is contained in:
parent
521945a2d2
commit
769ab1e424
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
|
||||
-
|
||||
<i>{{if .ExpiredUnix}}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
|
||||
<i>{{if not .ExpiredUnix.IsZero}}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue