Skip to content
Snippets Groups Projects
Commit 5e732180 authored by Aymeric Chaumont's avatar Aymeric Chaumont
Browse files

conflicts

parents 928b2238 00d9b2c9
No related branches found
No related tags found
2 merge requests!29Time dependence,!28improve front
Pipeline #43932 passed with warnings
......@@ -13,8 +13,13 @@ from db import models, schemas
def get_waiting_time(place: str, db: Session):
""" Get the last estimated waiting time for the given place """
<<<<<<< HEAD
current_date = datetime.now(tz=pytz.timezone("Europe/Paris"))
weekday, current_time = current_date.weekday(), date.time()
=======
date = datetime.now(tz=pytz.timezone("Europe/Paris"))
weekday, current_time = date.weekday(), date.time()
>>>>>>> 00d9b2c9fa55c3e0926b456eb76b17b94ad9d45a
first_timeslot = get_timeslot(place, weekday, True, db)
if first_timeslot and current_time < first_timeslot[0]:
return first_timeslot[0].hour, first_timeslot[0].minute
......@@ -44,7 +49,11 @@ def get_waiting_time(place: str, db: Session):
return None, None
<<<<<<< HEAD
def get_avg_graph_points(place: str, weekday: int, min_time: time, max_time: time, interval: timedelta, db: Session):
=======
def get_stats(place: str, weekday: int, min_time: time, max_time: time, interval: timedelta, db: Session):
>>>>>>> 00d9b2c9fa55c3e0926b456eb76b17b94ad9d45a
""" Get the average waiting time for each interval between two time steps """
def shift_time(t: time, delta: timedelta):
......
......@@ -48,4 +48,8 @@ class OpeningHours(Base):
day = Column(Integer)
timeslot = Column(Boolean)
open_time = Column(Time)
<<<<<<< HEAD
close_time = Column(Time)
=======
close_time = Column(Time)
>>>>>>> 00d9b2c9fa55c3e0926b456eb76b17b94ad9d45a
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment