Skip to content
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

Enhances user-facing dates #631

merged 2 commits into from Jan 23, 2019

Enhances user-facing dates #631

merged 2 commits into from Jan 23, 2019


Copy link

@samueldr samueldr commented Jan 22, 2019

With these changes, dates will be automatically switched to the user's timezone with JavaScript. Users without JavaScript enabled will have the previous behaviour, with the addition of a title which holds a fuller date, which also shows the timezone name. Additionally, relative times will always show more details in the title.

The user-facing dates, when enhanced, also present an enhanced title test, here's an example:

Adjusted to local time (-05:00)
Other timezones:
  UTC: 2018-12-02 01:39:40
  As Hydra reported: 2018-12-01 20:39:40 (EST)

The first line shows the user's timezone's offset, and also shows the date in UTC and hydra-local timezone.


I have been burned by the instance, assuming the dates were UTC, since there was no timezone label at all, and no setting available.

With this change, it is harder for an end-user to make bad assumptions about dates, EXCEPT for users which were used to timezone offsets. This is helped by introducing an underline to the dates, hoping the users then notice the cursor change and the title text.

Additionally, iconography could be added to try an better indicate the change, but I fear this would be too much.

Finally, relative dates haven't been touched. It could be possible to hook a live-updater to the relative times, but I don't want to introduce other third-party code. Making it ourselves could work, but for the investment of time (not that much) I'd prefer a clear go-ahead.

I think this fully addresses #393 cc @copumpkin

Copy link

LnL7 commented Jan 22, 2019

Works on my machine™.


Also ensures it makes available the hydra timezone in the title of the
Copy link
Member Author

samueldr commented Jan 22, 2019

Not quite, the previous "works on my machine™" fails. The UTC field of the tooltip mutated the date object; this field was a late addition to the PR. The fix was trivial.

With the fix:


@edolstra edolstra merged commit 804c297 into NixOS:master Jan 23, 2019
@samueldr samueldr deleted the feature/dates branch January 24, 2019 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants