diff --git a/participation/views.py b/participation/views.py index 1accf81..b596e61 100644 --- a/participation/views.py +++ b/participation/views.py @@ -27,6 +27,7 @@ from django.urls import reverse_lazy from django.utils import timezone from django.utils.crypto import get_random_string from django.utils.decorators import method_decorator +from django.utils.timezone import localtime from django.utils.translation import gettext_lazy as _ from django.views.decorators.csrf import csrf_exempt from django.views.generic import CreateView, DetailView, FormView, RedirectView, TemplateView, UpdateView, View @@ -1952,7 +1953,8 @@ class GSheetNotificationsView(View): return HttpResponse(status=404) tournament = await Tournament.objects.prefetch_related('participation_set', 'pools').aget(pk=kwargs['pk']) - expected_channel_id = sha1(f"{tournament.name}-{timezone.now().date()}-{request.site.domain}".encode()) \ + now = localtime(timezone.now()) + expected_channel_id = sha1(f"{tournament.name}-{now.date()}-{request.site.domain}".encode()) \ .hexdigest() if request.headers['X-Goog-Channel-ID'] != expected_channel_id: