Skip to content

Commit eea23bb

Browse files
authored
Remove unnecessary helper function DateFmtLong (#24343)
After #24317 this function is only used in one place where it is not needed. I confirmed the timestamp still renders correctly Signed-off-by: Yarden Shoham <[email protected]>
1 parent fb37eef commit eea23bb

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

modules/templates/helper.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ func NewFuncMap() []template.FuncMap {
141141
"TimeSinceUnix": timeutil.TimeSinceUnix,
142142
"DateTime": timeutil.DateTime,
143143
"Sec2Time": util.SecToTime,
144-
"DateFmtLong": func(t time.Time) string {
145-
return t.Format(time.RFC3339)
146-
},
147144
"LoadTimes": func(startTime time.Time) string {
148145
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"
149146
},

templates/admin/cron.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<td><button type="submit" class="ui green button" name="op" value="{{.Name}}" title="{{$.locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
2222
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
2323
<td>{{.Spec}}</td>
24-
<td>{{DateTime "full" (DateFmtLong .Next)}}</td>
24+
<td>{{DateTime "full" .Next}}</td>
2525
<td>{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}N/A{{end}}</td>
2626
<td>{{.ExecTimes}}</td>
2727
<td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>

0 commit comments

Comments
 (0)