mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
First steps into pytz deprecation
This commit is contained in:
@@ -37,7 +37,6 @@ import tempfile
|
||||
from collections import OrderedDict, defaultdict
|
||||
from decimal import Decimal
|
||||
|
||||
import pytz
|
||||
from dateutil.parser import parse
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
@@ -83,7 +82,7 @@ class ReportlabExportMixin:
|
||||
return 'report-%s.pdf' % self.event.slug, 'application/pdf', self.create(form_data)
|
||||
|
||||
def get_filename(self):
|
||||
tz = pytz.timezone(self.event.settings.timezone)
|
||||
tz = self.event.timezone
|
||||
return "%s-%s.pdf" % (self.name, now().astimezone(tz).strftime("%Y-%m-%d-%H-%M-%S"))
|
||||
|
||||
@staticmethod
|
||||
@@ -444,7 +443,7 @@ class OrderTaxListReportPDF(Report):
|
||||
headlinestyle = self.get_style()
|
||||
headlinestyle.fontSize = 15
|
||||
headlinestyle.fontName = 'OpenSansBd'
|
||||
tz = pytz.timezone(self.event.settings.timezone)
|
||||
tz = self.event.timezone
|
||||
|
||||
tax_rates = set(
|
||||
a for a
|
||||
|
||||
Reference in New Issue
Block a user