Skip to content

Switch from pytz to zoneinfo

After upgrading Django 3.2 ⇒ 4.1 the system reported exception with pytz. Django 4.0 has switched from pytz to zoneinfo — https://docs.djangoproject.com/en/4.1/releases/4.0/#what-s-new-in-django-4-0 . I do not have the exact exception, but this patch made the problem disappear. Also necessary is the installation of the tzdata pip-package.

I cannot say if this works with Django 3.2, I can state that it works for me.

The pytz is still needed by djangorestframework, so it cannot be removed.

Merge request reports