The (awful) API provided by pytz and the requirement for localize() is there for legacy reasons. At the time, it was the only way to get the Python datetime library to do what was needed to get cross-timezone, DST aware arithmetic working. The future is the new built-in support in Python 3.9, available as a backport to earlier Python versions at https://pypi.org/project/backports.zoneinfo/
The (awful) API provided by pytz and the requirement for localize() is there for legacy reasons. At the time, it was the only way to get the Python datetime library to do what was needed to get cross-timezone, DST aware arithmetic working. The future is the new built-in support in Python 3.9, available as a backport to earlier Python versions at https:/ /pypi.org/ project/ backports. zoneinfo/