From a45f4cce4fd732b134a7e68e2390e913337cf122 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 29 Apr 2021 17:14:04 +0200 Subject: [PATCH] Fix incorrect timezone in check-in list export --- src/pretix/plugins/checkinlists/exporters.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pretix/plugins/checkinlists/exporters.py b/src/pretix/plugins/checkinlists/exporters.py index 87db141f8d..7967320b37 100644 --- a/src/pretix/plugins/checkinlists/exporters.py +++ b/src/pretix/plugins/checkinlists/exporters.py @@ -310,7 +310,11 @@ class PDFCheckinList(ReportlabExportMixin, CheckInListMixin, BaseExporter): story += [ Spacer(1, 3 * mm), Paragraph( - '{} ({} {})'.format(cl.subevent.name, cl.subevent.get_date_range_display(), date_format(cl.subevent.date_from, 'TIME_FORMAT')), + '{} ({} {})'.format( + cl.subevent.name, + cl.subevent.get_date_range_display(), + date_format(cl.subevent.date_from.astimezone(self.timezone), 'TIME_FORMAT') + ), self.get_style() ), ] @@ -637,8 +641,8 @@ class CheckinLogList(ListExporter): ia = InvoiceAddress() yield [ - date_format(ci.datetime, 'SHORT_DATE_FORMAT'), - date_format(ci.datetime, 'TIME_FORMAT'), + date_format(ci.datetime.astimezone(self.timezone), 'SHORT_DATE_FORMAT'), + date_format(ci.datetime.astimezone(self.timezone), 'TIME_FORMAT'), str(ci.list), ci.get_type_display(), ci.position.order.code,