From 48ca695c463afdbe7ac6e96d2a0b1c8f83439685 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sat, 15 Feb 2020 11:57:55 -0500 Subject: [PATCH] Show last update check time in local timezone --- admin.go | 2 ++ templates/user/admin/app-updates.tmpl | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin.go b/admin.go index e3a1b33..7be67e9 100644 --- a/admin.go +++ b/admin.go @@ -584,6 +584,7 @@ func handleViewAdminUpdates(app *App, u *User, w http.ResponseWriter, r *http.Re p := struct { *UserPage LastChecked string + LastChecked8601 string LatestVersion string LatestReleaseNotesURL string UpdateAvailable bool @@ -592,6 +593,7 @@ func handleViewAdminUpdates(app *App, u *User, w http.ResponseWriter, r *http.Re } if app.cfg.App.UpdateChecks { p.LastChecked = app.updates.lastCheck.Format("January 2, 2006, 3:04 PM") + p.LastChecked8601 = app.updates.lastCheck.Format("2006-01-02T15:04:05Z") p.LatestVersion = app.updates.LatestVersion() p.LatestReleaseNotesURL = app.updates.ReleaseNotesURL() p.UpdateAvailable = app.updates.AreAvailable() diff --git a/templates/user/admin/app-updates.tmpl b/templates/user/admin/app-updates.tmpl index 3988a50..5d91230 100644 --- a/templates/user/admin/app-updates.tmpl +++ b/templates/user/admin/app-updates.tmpl @@ -15,7 +15,14 @@ For details on features, bug fixes or notes on upgrading, read the release notes. {{end}} -

Last checked at: {{.LastChecked}}. Check now.

+

Last checked at: . Check now.

+ + {{template "footer" .}}