-
Notifications
You must be signed in to change notification settings - Fork 35
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
GMT Offsets appear to work in opposite direction #62
Comments
What's |
It's from date-fns and used like:
|
I can reproduce this issue https://codesandbox.io/s/cold-water-lo0c8m?file=/src/index.js |
If it's just a data issue, not a formatting issue, perhaps the data added in #57 by @jacobwahoo wasn't right (flipped sign)? |
I know it's weird, but for the Etc/GMT offsets, the convention is to reverse the direction. Don't ask me why. Here's a list on IBM's website. You can see that Etc/GMT+12 is equivalent to GMT-12:00, Etc/GMT+11 is equivalent to GMT-11:00, etc. Here's a post on the Oracle community about how confusing it is: So the time zones are fine. It's the convention that's messed up. Edit: This was linked on one of those pages: https://opensource.apple.com/source/system_cmds/system_cmds-230/zic.tproj/datfiles/etcetera I'm looking in my Here is a tree of the zoneinfo folder from Ubuntu if anyway wants to doublecheck https://gist.github.com/jacobwahoo/dd5ae4c9bf2630b9919c51d606d50b02 |
Thank you @jacobwahoo . Given that amazing answer I believe my issue here can be safely closed, unless anyone disagrees. |
It might be worth updating the README to say that they are backwards from what you might expect. Maybe we can avoid this confusion in the future |
Wow, that is confusing! Are there better numerically-named timezones to use instead of Etc/GMT+ that should be used here? If not, just a note in the README.md is probably a good idea =). |
@Jimbly Not that I saw, but my comment above has an enumeration of the timezone folder from my Ubuntu WSL instance if you want to look for yourself. |
Okay, thanks for checking. I've added a note to the README and will consider this closed =). |
Great apologies, but I don't have time to create a reproducible example, but as a quick summary:
The text was updated successfully, but these errors were encountered: