Use ZoneInfo instead of pytz on Python 3.9+
See original GitHub issueAnd update deps to pytz; python_version < "3.9"
cc @regebro 😄
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
zoneinfo — IANA time zone support — Python 3.11.1 ...
The zoneinfo module does not directly provide time zone data, and instead pulls time zone information from the system time zone database or...
Read more >Proposal: Drop dependency on pytz in favor of zoneinfo
- In version X, Django deprecates usage of pytz and introduces the TIMEZONE setting. It has the same meaning as TIME_ZONE, but the...
Read more >zoneinfo: A stunning module of exceptional quality
Python's Time Zone Model ## `tzinfo` * Time zones are provided by *subclassing* `tzinfo`. * Information provided is a function of the datetime:...
Read more >Replace pytz.UTC with zoneinfo('UTC') · Issue #1440 - GitHub
We're using pytz.UTC for timezone-aware dates. Python 3.9 has added zoneinfo as a standard module. If we use this, then pytz can be...
Read more >Regarding the pytz module and the time module in Python
Note: pytz is now obsolete (since two weeks), so with Python 3.9 you can uses directly standard libraries. The problem: pytz is updated ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure we want this in the standard library since this library has quite a few kludges to get the time zone information out of the (sometimes uncooperative) operating systems.
I am however eager to see a pytz-free version of this library. Maybe somebody should fork it if @regebro does not want to mess with
zoneinfo
in this one.I assume that this will be a breaking change, because
pytz
zones are used very differently from standardtzinfo
s. End users will need to stop using.localize
.@regebro If you’re interested, I’d like to see some similar functionality to this added to the
zoneinfo
module in Python 3.10. I was going to write it myself, but I’d be happy to have an expert collaborator 😄.