Repository navigation
fix(tz): map the Windows zones CLDR already names - #1059
Open
Cherith1222 wants to merge 2 commits into
Open
Cherith1222 wants to merge 2 commits into
Cherith1222 wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or 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
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.
Why
On Windows,
pendulum.now()looks upTimeZoneKeyNamein a fixed table and raisesLookupErrorwhen the name is missing. CLDR's territory 001 rows already name seven of those zones, including the Canada zones Windows added in October 2026. Two older rows also point at zones that no longer share the Windows offset.What changed
Scope
Europe/KyivandEtc/GMTspellings as they are.tzdatarequirement. Winnipeg's offset after 1 November 2026 still depends on a currenttzdata.Tradeoffs
Keeping Asia/Almaty and America/Chihuahua would preserve offsets that are an hour away from the Windows zone. This table already follows CLDR's territory 001 row for the other names.
Blast Radius
pendulum.now()on Windows reads this table. Machines on the new Canada zones stop raising. Machines on Central Asia Standard Time or Mountain Standard Time (Mexico) follow the CLDR zone.Verification
KeyError. Central Asia wasAsia/Almaty, and Mountain Standard Time (Mexico) wasAmerica/Chihuahua.py -3.13 -m pytest tests/tz/test_local_timezone.py -qreported 11 passed and 3 skipped. The skipped tests are the Unix-only cases.Asia/Taipei.Fixes #1058
Drafted with Cursor.