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 timezone parsing functions for non-hour timezones #1547

Merged
merged 1 commit into from Jan 25, 2023

Conversation

jcowgill
Copy link
Contributor

The utctz_to_altz and altz_to_utctz_str functions fail to handle timezones with UTC offsets that are not a multiple of one hour. Rewrite them and add some unit tests.

Fixes #630

The `utctz_to_altz` and `altz_to_utctz_str` functions fail to handle
timezones with UTC offsets that are not a multiple of one
hour. Rewrite them and add some unit tests.

Fixes gitpython-developers#630
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a million, this is long overdue!

@Byron Byron added this to the v3.1.31 - Bugfixes milestone Jan 25, 2023
@Byron
Copy link
Member

Byron commented Jan 25, 2023

By the way, I can imagine a round-trip test that runs from -12*3600 to 12 * 3600 and assures that b(a(t)) == t for each second this loop produces. If you are intrigued, maybe submit another PR for that :).

@Byron Byron merged commit 63a60b3 into gitpython-developers:main Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Wrong timezone on commit
2 participants