mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Revert "First steps into pytz deprecation"
This reverts commit e4e7d50659.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
import datetime
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import pytz
|
||||
import vobject
|
||||
from django.conf import settings
|
||||
from django.utils.formats import date_format
|
||||
@@ -40,11 +41,11 @@ def get_public_ical(events):
|
||||
"""
|
||||
cal = vobject.iCalendar()
|
||||
cal.add('prodid').value = '-//pretix//{}//'.format(settings.PRETIX_INSTANCE_NAME.replace(" ", "_"))
|
||||
creation_time = datetime.datetime.now(datetime.timezone.utc)
|
||||
creation_time = datetime.datetime.now(pytz.utc)
|
||||
|
||||
for ev in events:
|
||||
event = ev if isinstance(ev, Event) else ev.event
|
||||
tz = event.timezone
|
||||
tz = pytz.timezone(event.settings.timezone)
|
||||
if isinstance(ev, Event):
|
||||
url = build_absolute_uri(event, 'presale:event.index')
|
||||
else:
|
||||
@@ -112,9 +113,9 @@ def get_private_icals(event, positions):
|
||||
- It would be pretty hard to implement it in a way that doesn't require us to use distinct
|
||||
settings fields for emails to customers and to attendees, which feels like an overcomplication.
|
||||
"""
|
||||
tz = event.timezone
|
||||
tz = pytz.timezone(event.settings.timezone)
|
||||
|
||||
creation_time = datetime.datetime.now(datetime.timezone.utc)
|
||||
creation_time = datetime.datetime.now(pytz.utc)
|
||||
calobjects = []
|
||||
|
||||
evs = set(p.subevent or event for p in positions)
|
||||
|
||||
Reference in New Issue
Block a user