-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use JS to convert timezones to local #15732
Comments
Agreed. Either the user has to pass down their current timezone or it has to be rendered on the client. The issue is the language translation.(which we're currently not doing correctly anyway.) |
Yes, we can output a rendering in the server timezone as the placeholder value and as soon as JS loads, that's going to be replaced by a value for the actual user time zone. Might want to extract the script that does that from the main JS bundle so the placeholder should only be there for a few milliseconds. |
I believe this can be closed as the following PRs were merged: |
time-elements now supports locales (github/relative-time-element#174) so my previous PRs could be replaced |
|
The timestamp output in the UI is currently incorrectly using a single time zone set on the server so it will not show the correct dates for the user's current timezone. Instead, we should use something like https://github.com/github/time-elements to render dates in the user's local timezone. This features does require JS to work, otherwise it will display the server-rendered fallback date.
The text was updated successfully, but these errors were encountered: