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

DST testing across many timezones? #556

Closed
justingrant opened this issue May 12, 2020 · 2 comments
Closed

DST testing across many timezones? #556

justingrant opened this issue May 12, 2020 · 2 comments

Comments

@justingrant
Copy link
Collaborator

Is Temporal testing its DST support across many different timezones? I'm asking because I was impressed with the CI test suite of date-fns which run all tests against hundreds of time zones for every PR. I used this suite to find a subtle bug that only reproed in Atlantic/Azores.

If Temporal isn't doing something like this, it should! (and might be able to borrow the implementation from date-fns)

For quick (non-CI) testing, I like this advice from https://www.npmjs.com/package/timezone-mock#supported-timezones:

Currently supported timezones are:

  • US/Pacific
  • US/Eastern
  • Brazil/East
  • UTC
  • Europe/London
  • Australia/Adelaide

I found that testing on these three were enough to ensure code worked in all timezones (important factor is to test on a timezone with Daylight Saving Time if your local timezone does not). Brazil/East has the unique characteristic of having the DST transition happen right at midnight, so code that sets a Date object to midnight on a particular day and then does operations on that Date object is especially vulnerable in that timezone. Europe/London is included as a timezone that is a positive offset from UTC, and Australia/Adelaide as one that has a large positive and non-integral offset (+9.5/+10.5).

@littledan
Copy link
Member

Yes, Temporal supports all sorts of timezones. Importing tests seems like a good idea.

@ryzokuken ryzokuken added documentation Additions to documentation feedback labels May 20, 2020
@ptomato ptomato mentioned this issue Jun 26, 2020
7 tasks
@ptomato ptomato added nice to have and removed feedback documentation Additions to documentation question labels Aug 25, 2020
@ptomato ptomato added this to the Stage 4 milestone Aug 25, 2020
@ptomato ptomato modified the milestones: Stage 4, Post Stage 4 Dec 8, 2022
@ptomato
Copy link
Collaborator

ptomato commented Jan 2, 2023

Added to the checklist at tc39/test262#3002

@ptomato ptomato closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants