-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Change the timezones to match the canonical IANA Zone IDs #870
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ANA Zone IDs This renames the following Zone IDs: * Beijing -> Shangai * Boulder -> Denver * GST -> Los_Angeles * India -> Kolkata * Israel -> Jerusalem * Japan -> Tokyo The new names are the *city* portion of the canonical Zone ID for each zone. (See https://nodatime.org/TimeZones for a complete list of canonical Zone IDs from IANA 2023c.) The most important change is “GST -> Los_Angeles”. In the code, “GST” was taken to mean “Google Standard Time”, but it already means something else: “Gulf Standard Time” (https://www.timeanddate.com/time/zones/gst). In addition: * The India zoneinfo file wasn’t YOINKed; now it is, under the name Kolkata * The Melbourne zoneinfo file *was* YOINKed; it was deleted in favor of an already-existing un-YOINKed Sydney file * The Singapore zoneinfo file wasn’t YOINKed; it was deleted (Melbourne is in the same timezone as Sydney. Singapore is in the same timezone as Shanghai. But note that “same timezone” is misleading, since *when* the standard time/daylight savings time shift happens is a political question.) Finally, the offsets in the docs were a mixture of standard time and daylight savings time. Now both offsets are given. The first is always the standard time offset. The second, if applicable, is the daylight savings offset. Among other things, that clarifies which timezones do and do not have daylight savings.
# Conflicts: # libc/time/localtime.c # test/libc/stdio/dirstream_test.c
michaellenaghan
changed the title
Change the timezones to the match the canonical IANA Zone IDs
Change the timezones to match the canonical IANA Zone IDs
Jul 27, 2023
Forgot to mention that checked all TZs by hand:
|
Closed
#1049 is somewhat related to this change |
Should be fixed as of b0df6c1. Thank you for bringing this to our attention @michaellenaghan. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a superset of the previous pull request. Rather than changing timezones to the match the city portion of the canonical IANA Zone IDs, this changes them to match the actual Zone ID. In my opinion, that's better — see, for example, this.
I split this into its own pull request because it might be more controversial.
You could accept the previous one, and then accept this one on top of it, or you could accept only this one. It depends on what kind of history you want. Assuming, that is, that you want to accept this change at all. :-)
Since this pull request could be accepted without that one, I'll copy the detailed explanation from that pull request.
P.S. I think the only controversial bit is the way I added the timezones in
libc\time\time.mk
; in terms of regions, I went the explicit route rather than the pattern route. Patterns over directories… Hmmm.===
This renames the following Zone IDs:
The new names are the city portion of the canonical Zone ID for each zone. (See https://nodatime.org/TimeZones for a complete list of canonical Zone IDs from IANA 2023c.)
The most important change is “GST -> Los_Angeles”. In the code, “GST” was taken to mean “Google Standard Time”, but it already means something else: “Gulf Standard Time” (https://www.timeanddate.com/time/zones/gst).
In addition:
(Melbourne is in the same timezone as Sydney. Singapore is in the same timezone as Shanghai. But note that “same timezone” is misleading, since when the standard time/daylight savings time shift happens is a political question.)
Finally, the offsets in the docs were a mixture of standard time and daylight savings time. Now both offsets are given. The first is always the standard time offset. The second, if applicable, is the daylight savings offset.