Skip to content

Fix timezone parsing functions for non-hour timezones - #1547

Merged
Byron merged 1 commit into
gitpython-developers:mainfrom
jcowgill:non-hour-timezones
Jan 25, 2023
Merged

Fix timezone parsing functions for non-hour timezones#1547
Byron merged 1 commit into
gitpython-developers:mainfrom
jcowgill:non-hour-timezones

Conversation

@jcowgill

Copy link
Copy Markdown
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

@Byron Byron left a comment

Copy link
Copy Markdown
Member

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

Byron commented Jan 25, 2023

Copy link
Copy Markdown
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 :).

@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

2 participants