Skip to content
Snippets Groups Projects
Commit f84334be authored by Antoine Gaudron-Desjardins's avatar Antoine Gaudron-Desjardins
Browse files

format hour

parent b92e8f6e
No related branches found
No related tags found
1 merge request!32fix css and other problems
Pipeline #43999 passed
......@@ -18,7 +18,7 @@ def get_waiting_time(place: str, db: Session):
data = {"status": False, "waiting_time": None, "next_timetable": None}
first_timeslot = get_timeslot(place, weekday, True, db)
if first_timeslot and current_time < first_timeslot[0]:
data["next_timetable"] = str(first_timeslot[0].time())[0:5]
data["next_timetable"] = "{:d}h{:02d}".format(first_timeslot[0].hour, first_timeslot[0].minute)
return data
elif first_timeslot and current_time <= first_timeslot[1]:
waiting_time = db.query(
......@@ -35,7 +35,7 @@ def get_waiting_time(place: str, db: Session):
return data
second_timeslot = get_timeslot(place, weekday, False, db)
if second_timeslot and current_time < second_timeslot[0]:
data["next_timetable"] = str(second_timeslot[0].time())[0:5]
data["next_timetable"] = "{:d}h{:02d}".format(second_timeslot[0].hour, second_timeslot[0].minute)
return data
elif second_timeslot and current_time <= second_timeslot[1]:
waiting_time = db.query(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment