Skip to content
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

Fix fold inconsistency #41

Merged
merged 2 commits into from
Apr 17, 2020
Merged

Fix fold inconsistency #41

merged 2 commits into from
Apr 17, 2020

Conversation

pganssle
Copy link
Owner

Prior to this change, when a zone has a single transition (particularly to a zone with no DST), the fold handling logic in the C extension was broken, because the logic for detecting how to handle the first offset was incorrectly based on the number of transitions rather than the number of ttinfos.

This bug was discovered by running the property tests over and over again hundreds of times; the minimal reproducing case has also been added to the unit tests.

@Zac-HD This is another one for the trophy case, if you're still collecting stuff caught prior to merge (though if I exposed the transitions for each zone, I think I could have found this by exhaustive testing, because there are only ~121k transitions across ~1800 time zones available on my machine).

This has a single transition, from LMT to GMT, in 1912.
Prior to this change, when a zone has a single transition (particularly
to a zone with no DST), the fold handling logic in the C extension was
broken, because the logic for detecting how to handle the first offset
was incorrectly based on the number of transitions rather than the
number of ttinfos.

This bug was discovered by running the property tests over and over
again hundreds of times; the minimal reproducing case has also been
added to the unit tests.
@pganssle pganssle merged commit 00cb426 into master Apr 17, 2020
@pganssle pganssle deleted the fix_fold_inconsistency branch May 21, 2020 13:44
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.

1 participant