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

@@ -45,8 +45,8 @@ from email.mime.image import MIMEImage
from email.utils import formataddr
from typing import Any, Dict, List, Sequence, Union
from urllib.parse import urljoin, urlparse
from zoneinfo import ZoneInfo
import pytz
import requests
from bs4 import BeautifulSoup
from celery import chain
@@ -218,11 +218,11 @@ def mail(email: Union[str, Sequence[str]], subject: str, template: Union[str, La
if event:
timezone = event.timezone
elif user:
timezone = ZoneInfo(user.timezone)
timezone = pytz.timezone(user.timezone)
elif organizer:
timezone = organizer.timezone
else:
timezone = ZoneInfo(settings.TIME_ZONE)
timezone = pytz.timezone(settings.TIME_ZONE)
if settings_holder:
if settings_holder.settings.mail_bcc: