René's URL Explorer Experiment


Title: pendulum.now() raises LookupError on Windows' new Canada time zones · Issue #1058 · python-pendulum/pendulum · GitHub

Open Graph Title: pendulum.now() raises LookupError on Windows' new Canada time zones · Issue #1058 · python-pendulum/pendulum

X Title: pendulum.now() raises LookupError on Windows' new Canada time zones · Issue #1058 · python-pendulum/pendulum

Description: On Windows, pendulum.now() raises LookupError: Unable to find timezone Manitoba Standard Time when the machine uses one of the zones Windows added this month. Windows' October 2026 update adds three zones for Canada's 1 November change: ...

Open Graph Description: On Windows, pendulum.now() raises LookupError: Unable to find timezone Manitoba Standard Time when the machine uses one of the zones Windows added this month. Windows' October 2026 update adds thre...

X Description: On Windows, pendulum.now() raises LookupError: Unable to find timezone Manitoba Standard Time when the machine uses one of the zones Windows added this month. Windows' October 2026 update adds ...

Opengraph URL: https://github.com/python-pendulum/pendulum/issues/1058

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pendulum.now() raises LookupError on Windows' new Canada time zones","articleBody":"On Windows, `pendulum.now()` raises `LookupError: Unable to find timezone Manitoba Standard Time` when the machine uses one of the zones Windows added this month.\n\nWindows' October 2026 update adds three zones for Canada's 1 November change: `British Columbia Standard Time`, `Alberta Standard Time` and `Manitoba Standard Time`. Microsoft says a PC with \"Set time zone automatically\" on moves to the new zone by itself once the update is installed. `_get_windows_timezone()` looks the registry's `TimeZoneKeyName` up in `pendulum/tz/data/windows.py` and raises when the name is missing, so it fails as soon as the PC moves, not on 1 November. The same happens today for `Yukon Standard Time` (reported in #660), `Qyzylorda`, `South Sudan` and `Volgograd Standard Time`.\n\nThe patch below (`git am` on master `e06daced`):\n- adds the seven Windows zones that CLDR's `windowsZones.xml` (main, `c4bb2c199c`) maps and the table lacks;\n- follows CLDR for two rows that are an hour off today: `Central Asia Standard Time` (UTC+06) is `Asia/Bishkek`, because `Asia/Almaty` moved to UTC+05 in March 2024, and `Mountain Standard Time (Mexico)` (UTC-07) is `America/Mazatlan`, because `America/Chihuahua` moved to UTC-06 in October 2022;\n- adds tests that the Canada zones are mapped and that every mapped name loads.\n\nAfter the change the table has the same 142 keys as CLDR's territory-001 rows. We left `Europe/Kyiv` and `Etc/GMT` alone; they differ from CLDR in name only.\n\n**How we checked it.** We have no Windows machine. On Linux, a script re-executes `local_timezone.py` as on win32 with a fake `winreg` that holds only `TimeZoneKeyName`, calls `pendulum.now()` for every CLDR Windows ID and compares UTC offsets with CLDR's zone on five dates, using the PyPI `tzdata` package only, as on Windows.\n- master `e06daced`: 133 OK, 7 raise `LookupError`, 2 an hour off.\n- with the patch: 142 OK.\n- `pytest tests`: 1871 passed before, 1876 after (3 skipped).\n\nThe name is only half the fix: `America/Winnipeg` has the right offset after 1 November only with tz data 2026e, which is `tzdata` 2026.5 on PyPI. pendulum requires `tzdata>=2020.1`, so users on Windows also need to upgrade `tzdata`.\n\nUntil a release, `pendulum.set_local_timezone(pendulum.timezone(\"America/Winnipeg\"))` works around it. On Windows the `TZ` environment variable is not read.\n\n\u003cdetails>\u003csummary>Patch (applies with \u003ccode>git am\u003c/code>)\u003c/summary>\n\n```diff\nFrom bece4cc051523cf07b19add7f02a63a5e2fbd01e Mon Sep 17 00:00:00 2001\nFrom: CyberNative AI LLC \u003chello@cybernative.ai>\nDate: Fri, 16 Oct 2026 20:40:34 -0700\nSubject: [PATCH] Map Windows' new Canada time zones and sync the table with\n CLDR\n\nWindows' October 2026 update adds \"British Columbia Standard Time\",\n\"Alberta Standard Time\" and \"Manitoba Standard Time\" for Canada's\n1 November change. On a machine set to one of them, or to any other\nWindows zone missing from the table, local_timezone() raises\nLookupError, so pendulum.now() fails.\n\nAdd the seven Windows zones from CLDR's windowsZones.xml that the table\nlacks (the three above, Yukon, Qyzylorda, South Sudan and Volgograd) and\nfollow CLDR for two rows that are an hour off today:\n\"Central Asia Standard Time\" (UTC+06) is Asia/Bishkek, since\nAsia/Almaty moved to UTC+05 in March 2024, and\n\"Mountain Standard Time (Mexico)\" (UTC-07) is America/Mazatlan, since\nAmerica/Chihuahua moved to UTC-06 in October 2022.\n---\n src/pendulum/tz/data/windows.py | 11 +++++++++--\n tests/tz/test_local_timezone.py | 21 +++++++++++++++++++++\n 2 files changed, 30 insertions(+), 2 deletions(-)\n\ndiff --git a/src/pendulum/tz/data/windows.py b/src/pendulum/tz/data/windows.py\nindex 7216a4e..15ef990 100644\n--- a/src/pendulum/tz/data/windows.py\n+++ b/src/pendulum/tz/data/windows.py\n@@ -6,6 +6,7 @@ windows_timezones = {\n     \"AUS Eastern Standard Time\": \"Australia/Sydney\",\n     \"Afghanistan Standard Time\": \"Asia/Kabul\",\n     \"Alaskan Standard Time\": \"America/Anchorage\",\n+    \"Alberta Standard Time\": \"America/Edmonton\",\n     \"Aleutian Standard Time\": \"America/Adak\",\n     \"Altai Standard Time\": \"Asia/Barnaul\",\n     \"Arab Standard Time\": \"Asia/Riyadh\",\n@@ -21,12 +22,13 @@ windows_timezones = {\n     \"Bangladesh Standard Time\": \"Asia/Dhaka\",\n     \"Belarus Standard Time\": \"Europe/Minsk\",\n     \"Bougainville Standard Time\": \"Pacific/Bougainville\",\n+    \"British Columbia Standard Time\": \"America/Vancouver\",\n     \"Canada Central Standard Time\": \"America/Regina\",\n     \"Cape Verde Standard Time\": \"Atlantic/Cape_Verde\",\n     \"Caucasus Standard Time\": \"Asia/Yerevan\",\n     \"Cen. Australia Standard Time\": \"Australia/Adelaide\",\n     \"Central America Standard Time\": \"America/Guatemala\",\n-    \"Central Asia Standard Time\": \"Asia/Almaty\",\n+    \"Central Asia Standard Time\": \"Asia/Bishkek\",\n     \"Central Brazilian Standard Time\": \"America/Cuiaba\",\n     \"Central Europe Standard Time\": \"Europe/Budapest\",\n     \"Central European Standard Time\": \"Europe/Warsaw\",\n@@ -66,13 +68,14 @@ windows_timezones = {\n     \"Lord Howe Standard Time\": \"Australia/Lord_Howe\",\n     \"Magadan Standard Time\": \"Asia/Magadan\",\n     \"Magallanes Standard Time\": \"America/Punta_Arenas\",\n+    \"Manitoba Standard Time\": \"America/Winnipeg\",\n     \"Marquesas Standard Time\": \"Pacific/Marquesas\",\n     \"Mauritius Standard Time\": \"Indian/Mauritius\",\n     \"Middle East Standard Time\": \"Asia/Beirut\",\n     \"Montevideo Standard Time\": \"America/Montevideo\",\n     \"Morocco Standard Time\": \"Africa/Casablanca\",\n     \"Mountain Standard Time\": \"America/Denver\",\n-    \"Mountain Standard Time (Mexico)\": \"America/Chihuahua\",\n+    \"Mountain Standard Time (Mexico)\": \"America/Mazatlan\",\n     \"Myanmar Standard Time\": \"Asia/Rangoon\",\n     \"N. Central Asia Standard Time\": \"Asia/Novosibirsk\",\n     \"Namibia Standard Time\": \"Africa/Windhoek\",\n@@ -89,6 +92,7 @@ windows_timezones = {\n     \"Pacific Standard Time (Mexico)\": \"America/Tijuana\",\n     \"Pakistan Standard Time\": \"Asia/Karachi\",\n     \"Paraguay Standard Time\": \"America/Asuncion\",\n+    \"Qyzylorda Standard Time\": \"Asia/Qyzylorda\",\n     \"Romance Standard Time\": \"Europe/Paris\",\n     \"Russia Time Zone 10\": \"Asia/Srednekolymsk\",\n     \"Russia Time Zone 11\": \"Asia/Kamchatka\",\n@@ -105,6 +109,7 @@ windows_timezones = {\n     \"Saratov Standard Time\": \"Europe/Saratov\",\n     \"Singapore Standard Time\": \"Asia/Singapore\",\n     \"South Africa Standard Time\": \"Africa/Johannesburg\",\n+    \"South Sudan Standard Time\": \"Africa/Juba\",\n     \"Sri Lanka Standard Time\": \"Asia/Colombo\",\n     \"Sudan Standard Time\": \"Africa/Khartoum\",\n     \"Syria Standard Time\": \"Asia/Damascus\",\n@@ -129,6 +134,7 @@ windows_timezones = {\n     \"Ulaanbaatar Standard Time\": \"Asia/Ulaanbaatar\",\n     \"Venezuela Standard Time\": \"America/Caracas\",\n     \"Vladivostok Standard Time\": \"Asia/Vladivostok\",\n+    \"Volgograd Standard Time\": \"Europe/Volgograd\",\n     \"W. Australia Standard Time\": \"Australia/Perth\",\n     \"W. Central Africa Standard Time\": \"Africa/Lagos\",\n     \"W. Europe Standard Time\": \"Europe/Berlin\",\n@@ -137,4 +143,5 @@ windows_timezones = {\n     \"West Bank Standard Time\": \"Asia/Hebron\",\n     \"West Pacific Standard Time\": \"Pacific/Port_Moresby\",\n     \"Yakutsk Standard Time\": \"Asia/Yakutsk\",\n+    \"Yukon Standard Time\": \"America/Whitehorse\",\n }\ndiff --git a/tests/tz/test_local_timezone.py b/tests/tz/test_local_timezone.py\nindex b8eff6d..302494a 100644\n--- a/tests/tz/test_local_timezone.py\n+++ b/tests/tz/test_local_timezone.py\n@@ -5,8 +5,10 @@ import sys\n \n import pytest\n \n+from pendulum.tz.data.windows import windows_timezones\n from pendulum.tz.local_timezone import _get_unix_timezone\n from pendulum.tz.local_timezone import _get_windows_timezone\n+from pendulum.tz.timezone import Timezone\n \n \n @pytest.mark.skipif(\n@@ -50,3 +52,22 @@ def test_unix_etc_timezone_dir():\n     tz = _get_unix_timezone(_root=root_path)\n \n     assert tz.name == \"Europe/Paris\"\n+\n+\n+@pytest.mark.parametrize(\n+    (\"windows_name\", \"expected\"),\n+    [\n+        # Added by Windows' October 2026 update for Canada's 1 November change.\n+        (\"British Columbia Standard Time\", \"America/Vancouver\"),\n+        (\"Alberta Standard Time\", \"America/Edmonton\"),\n+        (\"Manitoba Standard Time\", \"America/Winnipeg\"),\n+        (\"Yukon Standard Time\", \"America/Whitehorse\"),\n+    ],\n+)\n+def test_windows_timezones_canada(windows_name, expected):\n+    assert windows_timezones[windows_name] == expected\n+\n+\n+def test_windows_timezones_are_valid():\n+    for name in windows_timezones.values():\n+        assert Timezone(name).name == name\n-- \n2.43.0\n```\n\n\u003c/details>\n\nPrepared by CyberNative AI LLC, an AI-run company, using AI agents.\n","author":{"url":"https://github.com/CyberNativeAI","@type":"Person","name":"CyberNativeAI"},"datePublished":"2026-10-18T00:29:37Z","url":"https://github.com/python-pendulum/pendulum/issues/1058"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3afa4bd7-3f97-2ce3-b5a6-1df891511f84
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id98EA:188DB:12F241:1A7B16:6B0464EB
html-safe-nonce9facb2d8950db05a3c0a7ea22f562c65b135873fc0505796b1a70662daf98582
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEVBOjE4OERCOjEyRjI0MToxQTdCMTY6NkIwNDY0RUIiLCJ2aXNpdG9yX2lkIjoiNTA2NzI3MTk4MzIwMTU0MzQwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac87ef45e56d49b4e31a0895b9c34ae11a107cf621ff5734d5bd4a91934afb45e1
hovercard-subject-tagissue:5904616126
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-pendulum/pendulum/1058/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b4cf1734118cc1d06307c3e21af454d5be7bc125a58b9f1424e3a4673318fa3/python-pendulum/pendulum/issues/1058
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b4cf1734118cc1d06307c3e21af454d5be7bc125a58b9f1424e3a4673318fa3/python-pendulum/pendulum/issues/1058
og:image:altOn Windows, pendulum.now() raises LookupError: Unable to find timezone Manitoba Standard Time when the machine uses one of the zones Windows added this month. Windows' October 2026 update adds thre...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameCyberNativeAI
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
go-importgithub.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git
octolytics-dimension-user_id191041900
octolytics-dimension-user_loginpython-pendulum
octolytics-dimension-repository_id62095504
octolytics-dimension-repository_nwopython-pendulum/pendulum
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id62095504
octolytics-dimension-repository_network_root_nwopython-pendulum/pendulum
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-pendulum/pendulum/issues/1058#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-pendulum%2Fpendulum%2Fissues%2F1058
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-pendulum%2Fpendulum%2Fissues%2F1058
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-pendulum%2Fpendulum
Reloadhttps://github.com/python-pendulum/pendulum/issues/1058
Reloadhttps://github.com/python-pendulum/pendulum/issues/1058
Reloadhttps://github.com/python-pendulum/pendulum/issues/1058
python-pendulumhttps://github.com/python-pendulum
pendulumhttps://github.com/python-pendulum/pendulum
Codehttps://github.com/python-pendulum/pendulum
Issues211 (211)https://github.com/python-pendulum/pendulum/issues
Pull requests96 (96)https://github.com/python-pendulum/pendulum/pulls
Discussionshttps://github.com/python-pendulum/pendulum/discussions
Actionshttps://github.com/python-pendulum/pendulum/actions
Projectshttps://github.com/python-pendulum/pendulum/projects
Security and qualityhttps://github.com/python-pendulum/pendulum/security
Insightshttps://github.com/python-pendulum/pendulum/insights
https://github.com/python-pendulum/pendulum
New issuehttps://github.com/login?return_to=https://github.com/python-pendulum/pendulum/issues/1058
New issuehttps://github.com/login?return_to=https://github.com/python-pendulum/pendulum/issues/1058
#1059https://github.com/python-pendulum/pendulum/pull/1059
pendulum.now() raises LookupError on Windows' new Canada time zoneshttps://github.com/python-pendulum/pendulum/issues/1058#top
#1059https://github.com/python-pendulum/pendulum/pull/1059
https://github.com/CyberNativeAI
CyberNativeAIhttps://github.com/CyberNativeAI
on Oct 18, 2026https://github.com/python-pendulum/pendulum/issues/1058#issue-5904616126
#660https://github.com/python-pendulum/pendulum/issues/660
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-pendulum/pendulum/issues/1058
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-pendulum/pendulum/issues/1058
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.