From 5caaa8586d42ad81b58346fa8fe35de48ab9350e Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Thu, 4 Dec 2025 10:59:57 +0100 Subject: [PATCH] Fix accounting report pending payment timezone (#5698) --- src/pretix/plugins/reports/accountingreport.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pretix/plugins/reports/accountingreport.py b/src/pretix/plugins/reports/accountingreport.py index 1c9d34ebf0..17315eb02b 100644 --- a/src/pretix/plugins/reports/accountingreport.py +++ b/src/pretix/plugins/reports/accountingreport.py @@ -644,7 +644,9 @@ class ReportExporter(ReportlabExportMixin, BaseExporter): FontFallbackParagraph( _("Pending payments at {datetime}").format( datetime=date_format( - df_start - datetime.timedelta.resolution, + (df_start - datetime.timedelta.resolution).astimezone( + self.timezone + ), "SHORT_DATETIME_FORMAT", ) ), @@ -694,7 +696,9 @@ class ReportExporter(ReportlabExportMixin, BaseExporter): Paragraph( _("Pending payments at {datetime}").format( datetime=date_format( - (df_end or now()) - datetime.timedelta.resolution, + ((df_end or now()) - datetime.timedelta.resolution).astimezone( + self.timezone + ), "SHORT_DATETIME_FORMAT", ) ), @@ -751,7 +755,9 @@ class ReportExporter(ReportlabExportMixin, BaseExporter): Paragraph( _("Total gift card value at {datetime}").format( datetime=date_format( - df_start - datetime.timedelta.resolution, + (df_start - datetime.timedelta.resolution).astimezone( + self.timezone + ), "SHORT_DATETIME_FORMAT", ) ), @@ -789,7 +795,9 @@ class ReportExporter(ReportlabExportMixin, BaseExporter): Paragraph( _("Total gift card value at {datetime}").format( datetime=date_format( - (df_end or now()) - datetime.timedelta.resolution, + ((df_end or now()) - datetime.timedelta.resolution).astimezone( + self.timezone + ), "SHORT_DATETIME_FORMAT", ) ),