aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorHarald Kraemer <tetha42@gmail.com>2021-07-24 12:39:31 +0200
committerGitHub <noreply@github.com>2021-07-24 13:39:31 +0300
commit892af4b96106670f5c2744c39665036401c68796 (patch)
tree894b06f9b744d2491e4b3bac65fe2745773f1fc4 /layouts
parentbd976919f2e3cea3b34cd9b9b9113f410192b39e (diff)
Fix relative date for resolved issues and non-UTC browser timezone. (#197)
* Remove Storehouse from the README examples (#195) Their status page is no longer present, as they seem to be changing their web strategy * Fix relative date for resolved issues and non-UTC browser timezone. The missing <UTC> in the layout causes a weird glitch if the users browser is in a non-UTC timezone. For open incidents, the time is rendered as "23-07-2021 12:17:40 UTC", and then the javascript library correctly translates from UTC into the users browser time, resulting in say "30m ago". For a resolved incident, the timezone of the date was stripped due to the missing <UTC> in the format string, resulting in "23-07-2021 12:17:40". If the user has a browser is in the timezone CEST (UTC+2), this causes the relative time to jump from "30 minutes ago" for an open incident to "2 hours ago" for a closed incident, because now the time without time zone is not interpreted as UTC anymore. Co-authored-by: Justin Clift <82353280+jc-dgit@users.noreply.github.com> Co-authored-by: Harald Kraemer <harald.kraemer@sabio.de>
Diffstat (limited to 'layouts')
-rw-r--r--layouts/issues/small.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/issues/small.html b/layouts/issues/small.html
index 531b47b..115d5d0 100644
--- a/layouts/issues/small.html
+++ b/layouts/issues/small.html
@@ -23,7 +23,7 @@
</span>
{{ else if .Params.Resolved }}
- <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
{{ if .Site.Params.dateFormat }}
{{ .Date.Format .Site.Params.dateFormat }}
{{ else }}