Skip to content

Update MODE=tiny time zone list #1167

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

Merged
merged 7 commits into from
May 6, 2024
Merged

Update MODE=tiny time zone list #1167

merged 7 commits into from
May 6, 2024

Conversation

mrdomino
Copy link
Collaborator

@mrdomino mrdomino commented May 6, 2024

Winnows down Europe to one zone per different set of current offsets / DST rules in each region that contains a Google office (so excepting Iceland, Kaliningrad, and Armenia / Georgia / Samara, which all do not observe DST and as such can use a Etc/ zone without issue.)

Adds some outliers, in particular:

  • Nova Scotia (as America/Halifax) (AST / ADT)
  • Newfoundland (as America/St_Johns) (DST, offset by a half hour interval from UTC)
  • Chatham Islands (offset by a 45 minutes interval from UTC)

Total net space in o/tiny/examples/localtime is about -5kb.

mrdomino added 5 commits May 5, 2024 21:25
I took one canonical IANA zone ID from each of the different colored
regions in this article, except those that do not observe DST and do
not at present contain a Google office:

<https://en.wikipedia.org/wiki/Time_in_Europe>

As to which canonical ID to use, this was somewhat arbitrary. Brussels
was obvious, as the de facto capital of the EU. For the rest, I mostly
just went with lexicographic ordering of the most recognizable options.
Keeps the U.S. ones together but does everything alphabetically
otherwise.
These have DST (and Newfoundland is off by a half-hour from a UTC
interval) so they cannot use Etc/.
This is the last of the zones that I'm aware of that has a non-integer
hour offset from UTC.
@mrdomino mrdomino marked this pull request as draft May 6, 2024 04:29
@mrdomino mrdomino marked this pull request as ready for review May 6, 2024 04:30
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

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

Anything you removed, could you remove it from the list in third_party/tz/windows.py too? Then run python third_party/tz/windows.py to regenerate some of the content for kWindowsZones below.

@mrdomino
Copy link
Collaborator Author

mrdomino commented May 6, 2024

Done although I now wonder if we should include e.g. Budapest so that we get "Central Europe Standard Time", which, Brussels is mapped to "Romance Standard Time" (which is the same time zone) for some reason.

@mrdomino
Copy link
Collaborator Author

mrdomino commented May 6, 2024

Also do you want the newly added ones added to that list?

@mrdomino
Copy link
Collaborator Author

mrdomino commented May 6, 2024

I looked at it a bit more and I can't make heads or tails of the list of Windows timezone names.

I'm fine with merging this as-is, the supported list does not include anything that is not available anymore.

@jart jart merged commit 317c8bc into jart:master May 6, 2024
@mrdomino mrdomino deleted the tz branch May 7, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants