I am using Python 3.8, so I am using https://pypi.org/project/backports.zoneinfo/ to get zoneinfo. Django is deprecating the use of pytz
so I am performing the change from pytz
to zoneinfo
With pytz one would do from pytz import UTC
. The python documentation gets it from datetime.timezone.utc' (and this does not have a
localize` method).
How does one perform the equivalent of this:
pytz.UTC.localize(my_datetime, is_dst=None)
With zoneinfo?