This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author p-ganssle
Recipients Benedikt Bleimhofer, docs@python, p-ganssle
Date 2020-04-01.14:04:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585749879.27.0.101735443824.issue40136@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-04-01 14:04:39p-gansslesetrecipients: + p-ganssle, docs@python, Benedikt Bleimhofer
2020-04-01 14:04:39p-gansslesetmessageid: <1585749879.27.0.101735443824.issue40136@roundup.psfhosted.org>
2020-04-01 14:04:39p-gansslelinkissue40136 messages
2020-04-01 14:04:39p-gansslecreate