Page MenuHomeElementl

[dagit] Improve timestamp consistency and localization

Authored by dish on Feb 25 2021, 11:01 PM.



Use toLocaleDateString for formatting our timestamps, which allows us to use the user's locale settings to determine the correct timestamp format.

A couple of time rendering options are available, namely rendering seconds and rendering the short version of the timestamp itself.

Additionally, remove the UTC-specific default formatting. My thought here is that a user should be able to use UTC as their timezone while still getting a local timestamp format string.

Test Plan

Jest test to validate correct rendering for same-year vs. different-year.

Load Dagit in various locales (en-US, de-DE, hu-HU). Click around and verify that timestamp strings are correctly localized.

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable