Skip to content

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. Fixesgitpython-developers#630
Copy link
Member

@ByronByron 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!

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

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 :).

@ByronByron merged commit 63a60b3 into gitpython-developers:mainJan 25, 2023
Sign up for freeto 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

@jcowgill@Byron