Revert "First steps into pytz deprecation"

This reverts commit e4e7d50659.
This commit is contained in:
Raphael Michel
2023-02-01 13:15:18 +01:00
parent e4e7d50659
commit 59d46ddded
63 changed files with 362 additions and 341 deletions

View File

@@ -34,8 +34,8 @@
from datetime import timedelta
from decimal import Decimal
from zoneinfo import ZoneInfo
import pytz
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.db.models import (
@@ -510,7 +510,7 @@ def widgets_for_event_qs(request, qs, user, nmax, lazy=False):
for event in events:
if not lazy:
tzname = event.cache.get_or_set('timezone', lambda: event.settings.timezone)
tz = ZoneInfo(tzname)
tz = pytz.timezone(tzname)
if event.has_subevents:
if event.min_from is None:
dr = pgettext("subevent", "No dates")