Skip to content

Conversation

@tdruez
Copy link
Contributor

@tdruez tdruez commented Feb 13, 2025

Changes:

  • The data rendering format was simplified for improved readability
    • from Jan. 27, 2025, 07:55:54 a.m. UTC
    • to Jan 27, 2025, 7:55 AM UTC
  • The dates are now always rendered using this same format across the app.
  • The user timezone is automatically discovered and activated to the whole app using the browser JavaScript timeZone API
  • The user's automatic timezone can be overridden using the new User.timezone database field. The timezone value can be defined from the User > "Profile Settings" form. This value always takes precedence when defined.
  • In case the timezone is not defined by the user, or cannot be detected from the browser, the date rendering always fallback to UTC.
  • Note: all the "humanized dates" such as "Modified 23 hours ago" have the whole date syntax available in their title option, available on hovering the text with the cursor for a couple seconds.

@tdruez tdruez changed the title Add user time zone and use consistent rendering of data across the app #240 Add user time zone and use consistent rendering of date across the app #240 Feb 13, 2025
@DennisClark
Copy link
Member

@tdruez Everything works quite nicely as you described in Staging Starship, and I really like the hover feature on the "Modified x units ago" presentation.

I have one question though: when I set the Time Zone in my User Profile, the dropdown shows apparent duplicates in the list of Time Zones, for example "Samoa" and "Pacific" have 2 rows each and there is no obvious reason for the duplication. Any thoughts about that? There did not seem to be an actual problem when I picked one, but it's a bit weird.

Screenshot 2025-02-13 at 15 34 08

@mjherzog
Copy link
Member

@DennisClark That is just the standard timezone data

@DennisClark
Copy link
Member

@tdruez thanks, the new improvements look ready to deploy !

@tdruez
Copy link
Contributor Author

tdruez commented Feb 14, 2025

@DennisClark I've improved the rendering of the standard timezone list so more data is displayed.
Instead of those duplicates, you will now see:

  • (GMT-08:00) Canada - Pacific
  • (GMT-08:00) US - Pacific

@DennisClark
Copy link
Member

@tdruez Great, thanks !

Signed-off-by: tdruez <[email protected]>
@tdruez tdruez merged commit 3f38603 into main Feb 14, 2025
3 checks passed
@tdruez tdruez deleted the 240-timezone-rendering branch February 14, 2025 01:28
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.

3 participants