8000 Fix relative date for resolved issues and non-UTC browser timezone. by Tetha · Pull Request #197 · cstate/cstate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix relative date for resolved issues and non-UTC browser timezone. #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2021

Conversation

Tetha
Copy link
Contributor
@Tetha Tetha commented Jul 23, 2021

This closes #196 by adding the "UTC" to the partial small.html as it is in the other branch of the if statement.

Test plan

I've done the tiny change on our internal status page theme and ran hugo serve. Times ended up as expected.

Closing issues

closes #196

jc-dgit and others added 2 commits July 19, 2021 10:20
Their status page is no longer present, as they seem to be changing their web strategy
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.
@mistermantas mistermantas changed the base branch from master to dev July 23, 2021 13:16
@mistermantas
Copy link
Member

I'll check this out more in full sometime later cause i might have missed something else in the file too but hope to quickly merge it and release a big fix update after merging

@mistermantas mistermantas merged commit 892af4b into cstate:dev Jul 24, 2021
@mistermantas mistermantas mentioned this pull request Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time zone is stripped from relative time for resolved issues
3 participants
0