Change party start to 21h

This commit is contained in:
Ludovic Stephan 2020-05-20 17:48:47 +02:00
parent 39a2d309b5
commit 55f22f2250

View file

@ -922,8 +922,8 @@ def account_read_json(request, trigramme):
alcohol_density = 0.8 alcohol_density = 0.8
now = timezone.localtime(timezone.now()) now = timezone.localtime(timezone.now())
# une soirée va de XXh à 06h # une soirée va de XXh à 06h
if time(18) <= now.time() or now.time() <= time(6): if time(21) <= now.time() or now.time() <= time(6):
begin_time = datetime.combine(now.date(), time(18)) begin_time = datetime.combine(now.date(), time(21))
# si on est après minuit, il faut retrancher un jour # si on est après minuit, il faut retrancher un jour
if now.time() <= time(6): if now.time() <= time(6):
begin_time -= timedelta(days=1) begin_time -= timedelta(days=1)