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

Timezones: Include IANA timezone canonical name in TimeZoneInfo #27591

Merged
merged 1 commit into from Sep 17, 2020

Conversation

dprokop
Copy link
Member

@dprokop dprokop commented Sep 15, 2020

Ref: https://www.iana.org/time-zones , https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
This PR also sets the global timezone for tests to UTC.

@dprokop dprokop requested review from mckn, hugohaggmark and a team September 15, 2020 09:37
@dprokop dprokop self-assigned this Sep 15, 2020
@dprokop dprokop added this to In Review in Frontend Platform Backlog via automation Sep 15, 2020
if (!momentTz) {
return undefined;
}

return {
name: timeZone,
ianaName: momentTz.name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the proper name is olsonId.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick check on this and seems like there is no clear winner;) I think I'll stay with iana as Wikipedia states Olson database is occasionally used in as a name of this DB

@@ -1,3 +1,5 @@
process.env.TZ = 'UTC';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is deliberate, but feels very strange.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, had the same feeling but apparently this is the way jest wants the time zone to be set. I have not found any other way to get the timezone "mocked".

Copy link
Contributor

@hugohaggmark hugohaggmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great Dominik, I just left a minor nit.

@dprokop dprokop merged commit 7db050d into master Sep 17, 2020
Frontend Platform Backlog automation moved this from In Review to Done Sep 17, 2020
@dprokop dprokop deleted the tz-canonical-name branch September 17, 2020 06:59
@marefr marefr added this to the 7.3.0-beta1 milestone Oct 14, 2020
@wbrowne wbrowne mentioned this pull request Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants