1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 12:38:26 +02:00

datetime are time-zoned

This commit is contained in:
Yohann D'ANELLO
2020-05-05 13:51:47 +02:00
parent ecbbe46420
commit 72ca257bc3
3 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import random
from datetime import datetime
from datetime import timezone
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import AnonymousUser
@ -157,7 +157,7 @@ class DocumentView(LoginRequiredMixin, View):
if isinstance(doc, Solution):
for pool in doc.pools.all():
if pool.round == 2 and datetime.now() < doc.tournament.date_solutions_2:
if pool.round == 2 and timezone.now() < doc.tournament.date_solutions_2:
continue
if self.request.user.team in pool.teams.all():
grant = True