Absolute times always render in UTC #102

Open
opened 2022-11-26 21:00:31 +00:00 by bvisness · 0 comments
Owner

Because we don't store a timezone preference for users, any absolute dates rendered by the server appear in UTC. We typically dodge around this by using relative dates (e.g. "3 hours ago"), but it kinda sucks to be limited to this, and in the rare cases where we do still use an absolute date, it's confusing.

I think it would be reasonable to have some JS on the page that formats all absolute times in the browser's current locale. It could just look at the <time> elements on the page and format ones that are (somehow) marked as absolute.

Because we don't store a timezone preference for users, any absolute dates rendered by the server appear in UTC. We typically dodge around this by using relative dates (e.g. "3 hours ago"), but it kinda sucks to be limited to this, and in the rare cases where we do still use an absolute date, it's confusing. I think it would be reasonable to have some JS on the page that formats all absolute times in the browser's current locale. It could just look at the `<time>` elements on the page and format ones that are (somehow) marked as absolute.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/hmn#102
No description provided.