HomeElementl

[dagit] Improve timestamp consistency and localization

Description

[dagit] Improve timestamp consistency and localization

Summary:
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.

Reviewers: bengotow, prha, dgibson, sashank

Reviewed By: dgibson

Differential Revision: https://dagster.phacility.com/D6682

Details

Provenance
dishAuthored on Feb 24 2021, 8:57 PM
Reviewer
dgibson
Differential Revision
D6682: [dagit] Improve timestamp consistency and localization
Parents
R1:5c5e8e0f878b: Additional dbt solids (#3188)
Branches
Unknown
Tags
Unknown