Message365470
That is a specific problem with the third-party library `pytz`, not a standard feature of the datetime module. Using `datetime.replace` is the intended way to set a time zone, see: https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html
As of Python 3.6, we've been recommending dateutil.tz instead of pytz, and assuming PEP 615 is accepted ( https://www.python.org/dev/peps/pep-0615/ ), we will have a built in time zone type that supports IANA time zones.
I am going to close this because this is not a bug in CPython, but if you think otherwise feel free to continue using this ticket to make the case. |
|
Date |
User |
Action |
Args |
2020-04-01 14:04:39 | p-ganssle | set | recipients:
+ p-ganssle, docs@python, Benedikt Bleimhofer |
2020-04-01 14:04:39 | p-ganssle | set | messageid: <1585749879.27.0.101735443824.issue40136@roundup.psfhosted.org> |
2020-04-01 14:04:39 | p-ganssle | link | issue40136 messages |
2020-04-01 14:04:39 | p-ganssle | create | |
|