From fbe8d65a7c0d32760080e12e20e029a5fe289955 Mon Sep 17 00:00:00 2001 From: Loïc Guégan Date: Sat, 26 Jul 2025 09:16:50 +0200 Subject: Minor changes --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 07c77ed..f987060 100755 --- a/main.py +++ b/main.py @@ -22,9 +22,9 @@ def getweek(d): def getgloballectureslot(d): dname=d.strftime("%A").lower() if dname in i["semester"]["lectures"]["slots"].keys(): - start=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["start"], "%I%p") - end=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["end"], "%I%p") - (start,end) + start=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["start"], "%H:%M") + end=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["end"], "%H:%M") + return (start,end) return None def getassign(d): val="" @@ -44,8 +44,8 @@ def getlecture(d): # Time startT, endT = (None, None) if "slot" in i["lectures"][l]: - startT=datetime.strptime(i["lectures"][l]["slot"]["start"], "%I%p") - endT=datetime.strptime(i["lectures"][l]["slot"]["end"], "%I%p") + startT=datetime.strptime(i["lectures"][l]["slot"]["start"], "%H:%M") + endT=datetime.strptime(i["lectures"][l]["slot"]["end"], "%H:%M") elif slot is not None: startT, endT=slot # Content -- cgit v1.2.3