This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
fix gpg expired bug when time is zero (
#3584
)
tags/v1.21.12.1
Lunny Xiao
Lauris BH
8 years ago
parent
521945a2d2
commit
769ab1e424
2 changed files
with
6 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
modules/util/time_stamp.go
+1
-1
templates/user/settings/keys_gpg.tmpl
+ 5
- 0
modules/util/time_stamp.go
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()
}
+ 1
- 1
templates/user/settings/keys_gpg.tmpl
View File
@@ -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>
Write
Preview
Loading…
Cancel
Save