From 45111100695b238d96ff4103536f189a39ee11da Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 19 Feb 2020 14:27:39 +0100 Subject: [PATCH] Fix timezone of notifications --- src/pretix/base/services/notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/services/notifications.py b/src/pretix/base/services/notifications.py index 5d50a66eca..ac58b6752f 100644 --- a/src/pretix/base/services/notifications.py +++ b/src/pretix/base/services/notifications.py @@ -1,5 +1,6 @@ from django.conf import settings from django.template.loader import get_template +from django.utils.timezone import override from django_scopes import scope, scopes_disabled from inlinestyler.utils import inline_css @@ -79,7 +80,7 @@ def send_notification(logentry_id: int, action_type: str, user_id: int, method: if not notification_type: return # Ignore, e.g. plugin not active for this event - with language(user.locale): + with language(user.locale), override(logentry.event.timezone if logentry.event else user.timezone): notification = notification_type.build_notification(logentry) if method == "mail":