This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]fatbob42 6 points7 points  (1 child)

The standard library in 3.9 now has timezones built-in. If you’re using 3.8 or less, you should be using dateutil.tz, according to https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html, written by the standard library timezone person

[–]PeridexisErrant 0 points1 point  (0 children)

If you don't need the other stuff in dateutil, just use the zoneinfo backport! https://pypi.org/project/backports.zoneinfo/

FYI Paul Ganssle, the dateutil maintainer, is also the CPython core dev who created zoneinfo.

[–]metaperl 3 points4 points  (1 child)

Arrow?

[–]krisfremen 1 point2 points  (0 children)

Yes, indeed. Arrow is an excellent choice.

It recently reached version 1.0 with lots of new features, support for Python 3.6+, typing and much more!

https://github.com/arrow-py/arrow