fix(offset): correct ADT, AST, BST and GST to GNU's values - #325
Open
ARMeeru wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #325 +/- ##
=======================================
Coverage 99.34% 99.34%
=======================================
Files 21 21
Lines 4123 4131 +8
Branches 136 136
=======================================
+ Hits 4096 4104 +8
Misses 26 26
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ARMeeru
marked this pull request as ready for review
August 31, 2026 06:53
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.
timezone_name_to_offsetdocuments its own scope as matching GNU:This is the follow-up to #321, which measured the crate against GNU across 100 candidate abbreviations and found five where both accept the name but the offsets disagree. This PR corrects four of them to their tz database offsets, each a real behaviour fix for current users:
ADT-3 (was +4)AST-4 (was -3)BST+1 (was +6)GST+10 (was +4)For example,
parse_datetime("2026-06-15 12:00 BST")currently returns +06:00, which is Bangladesh Standard Time, where GNU says BST is +1 (British Summer Time).How the offsets were verified
With
zdumpagainst the tz databases of macOS 16 and Debian stable; both agree on every value above:ADT-03,AST-04 viaAmerica/HalifaxBST+01 viaEurope/LondonGST+10 viaPacific/GuamOne finding from the verification itself: GNU date ignores a bare abbreviation token in a date string entirely (verified on 9.7 Linux and 9.11 macOS), so the tz database is the operative reference for what these names mean, and that is what the table was checked against.
The fifth disagreement,
SST, is deliberately not touchedThe #321 measurements recorded GNU as resolving
SSTto -12, but the tz database bindsSSTto -11 (viaPacific/Pago_PagoandPacific/Midway) and no zone binds it to -12; the same scan on macOS and Debian tzdata agrees. Since the two authorities conflict on this one name, this PR leavesSSTat its current -11 and flags the disagreement rather than guessing. Happy to change it if the GNU reading of -12 has a source I could not find.Tests assert the four corrected values and fail without the fix.