-
Notifications
You must be signed in to change notification settings - Fork 837
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
Add tests for zone names / abbreviations #4
Comments
Time zone abbreviations can be ambiguous, such as Hawaii is usually So if we support abbreviations at all, they should be with a specific output token for We can obtain the correct time zone abbreviation from the tz data. Looking at the sample here, you can see that the abbreviation can be obtained by combining The list here has most of the common abbreviations, but I'm not sure if they align perfectly with the TZDB. |
Digging deeper, I see we are doing this already with both |
And from How to read the tz database:
|
@mj1856, we have For the tests, I think we can just try to match the // note PST and the end of the test description
t.equal(moment("1918-03-31T09:59:59+00:00").tz("America/Los_Angeles").format("HH:mm:ss"), "01:59:59", "1918-03-31T09:59:59+00:00 should be 01:59:59 PST"); |
I added tests for the zone abbreviations in #82, so if that gets merged, this can be closed. |
Test that the correct abbreviation is being used for each zone.
The text was updated successfully, but these errors were encountered: