-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Some timezones breaks after migrating from pytz to zoneinfo #333
Comments
I entered debug mode and found a function
|
…ateutil objects. Updates collective#333
I found the However, it will still be broken for time zones created through Timestamps and time zones in Python is such a mess ... |
…le. Still quite much copied code - this could be refactored to reduce the number of code lines, but possibly on the cost of readability. Updates collective#333
See collective#333 for details Includes test code and changelog entry
New test run of the code above:
Still one issue here, the UTC time zone should not be displayed. I'll create a separate issue for that. Replacing zoneinfo.ZoneInfo with dateutil.tz.gettz, the original issues still remain. I'll create a separate issue for that, too. |
Does this library use pytz or zoneinfo? Because in the readme it states pytz and I was about to ask, if we can replace it with zoneinfo nowadays? |
Zoneinfo is the way ahead, pytz is legacy. |
See collective#333 for details Includes test code and changelog entry
I believe this bug can be closed, as #339 has been merged. Or should the issue stay open until a proper release has been done? |
Hi, thanks again! I will close this when PRs get merged because issues are for development and the changelog for the releases. Thanks for asking! |
I just encountered a strange issue when running tests in my calendar-cli project. In particular, it broke with the DeNoronha timestamp (according to a contributor of test code to the caldav library, this place is well-known for being a "remote place", so it's used as a "remote time zone" in the tests). After migrating from pytz to zoneinfo the test code started breaking.
I wrote up the following code to highlight the breakage:
When running it, I get the following output:
Note that for every time zone above, the output has changed simply from moving from pytz to zoneinfo. I would expect there to be no changes in the output, and I think the pytz behaviour is correct:
The text was updated successfully, but these errors were encountered: