We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26539c2 commit d5059b4Copy full SHA for d5059b4
1 file changed
events/util.py
@@ -19,7 +19,7 @@
19
)
20
from django.conf import settings
21
from django.utils import timezone
22
-import pytz
+from zoneinfo import ZoneInfo
23
24
from django.db.models import Model
25
from django.forms.models import model_to_dict
@@ -93,7 +93,7 @@ def custom_model_to_dict(instance):
93
data[f.name] = f.value_from_object(instance)
94
return data
95
96
-user_tz = pytz.timezone(settings.TIME_ZONE)
+user_tz = ZoneInfo(settings.TIME_ZONE)
97
def localize_datetimes(obj):
98
for key, value in obj.items():
99
if isinstance(value, timezone.datetime):
0 commit comments