You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
gibsondan
changed the title
If you have the /etc/timezone file set to a timezone, pendulum.UTC has that timezone's utcoffset instead of None
If you have the /etc/timezone file set to a timezone string, pendulum.UTC has that timezone's utcoffset instead of None
Mar 12, 2024
Issue
This appears to be a bug in ZoneInfo that moved into pendulum in the 3.0 release now that TimeZone subclasses ZoneInfo.
Simple repro:
In a Docker container:
Then in Python:
outputs
datetime.timedelta(seconds=28800)
(the utcoffset of the timezone in /etc/timezone) instead of the expected None return value for UTC.This breaks all kinds of things.
The same issue happens with a ZoneInfo object:
See https://stackoverflow.com/questions/74467999/why-does-zoneinfoutc-do-different-time-conversions-from-timezone-utc for a similar report on ZoneInfo.
The text was updated successfully, but these errors were encountered: