Repository navigation
BST is utc+1 instead of +11 - #1321
Closed
Sphynx-HenryAY wants to merge 1 commit into
Closed
Sphynx-HenryAY wants to merge 1 commit into
Sphynx-HenryAY wants to merge 1 commit into
Conversation
Member
Member
|
But it also sounds like the most reasonable interpretation. The 11 value seems to be based in an old Alaska timezone, and the British one is the in the tz database. |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1321 +/- ##
=======================================
Coverage 97.21% 97.21%
=======================================
Files 235 235
Lines 2905 2905
=======================================
Hits 2824 2824
Misses 81 81 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
serhii73
added a commit
that referenced
this pull request
Aug 12, 2026
dateparser/timezones.py maps each timezone abbreviation to a single UTC offset. Unrelated zones often share the same letters, and because the table was scraped from Wikipedia, a few abbreviations ended up with a meaning no tz database zone has. "BST" resolved to +11, although the only zones named "BST" today are the UK ones, at +1 (#1321). Rather than patching that one value, compare the whole table against the tz database and fix every abbreviation it disagrees with: - BST: 39600 -> 3600 (British Summer Time) - HDT: -34200 -> -32400 (Hawaii-Aleutian Daylight Time, America/Adak) Abbreviations the tz database names with several offsets, such as CST, IST and PST, are left alone, because there is no single offset to prefer. Abbreviations no zone is named after any more, such as AHST and LMT, are kept so historical text still parses. The comparison lives in dateparser_scripts/tz_abbreviation_conflicts.py and uses pytz, already a dependency, whose bundled copy of the tz database gives the same answer on every platform; zoneinfo would depend on OS-provided data that Windows lacks without the tzdata package. Parsing is unchanged and still uses the static table. Fixes #1322 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
serhii73
added a commit
that referenced
this pull request
Aug 12, 2026
dateparser/timezones.py maps each timezone abbreviation to a single UTC offset. Unrelated zones often share the same letters, and because the table was scraped from Wikipedia, a few abbreviations ended up with a meaning no tz database zone has. "BST" resolved to +11, although the only zones named "BST" today are the UK ones, at +1 (#1321). Rather than patching that one value, compare the whole table against the tz database and fix every abbreviation it disagrees with: - BST: 39600 -> 3600 (British Summer Time) - HDT: -34200 -> -32400 (Hawaii-Aleutian Daylight Time, America/Adak) Abbreviations the tz database names with several offsets, such as CST, IST and PST, are left alone, because there is no single offset to prefer. Abbreviations no zone is named after any more, such as AHST and LMT, are kept so historical text still parses. The comparison lives in dateparser_scripts/tz_abbreviation_conflicts.py and uses pytz, already a dependency, whose bundled copy of the tz database gives the same answer on every platform; zoneinfo would depend on OS-provided data that Windows lacks without the tzdata package. Parsing is unchanged and still uses the static table. Fixes #1322 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
|
Fixed in #1366, released in dateparser 1.4.3 (2026-09-03). |
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.
No description provided.