From 4d4b83f4d423d4830b25d4575c07f3ffc5ff67c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Tue, 7 May 2024 00:58:47 +0200 Subject: [PATCH] Add datetime support --- colloscope/icalexport.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/colloscope/icalexport.py b/colloscope/icalexport.py index d573563..cdef89a 100644 --- a/colloscope/icalexport.py +++ b/colloscope/icalexport.py @@ -36,8 +36,7 @@ def to_calendar(student, term, include_EDT: bool = True): summary = f"Colle {colle.slot.subject} ({colle.slot.colleur})" event.add("summary", summary) - start = colle.datetime - print(start) + start = colle.datetime.astimezone(pytz.timezone(LOCAL_TZ)) fin = start + colle.slot.duration event.add("dtstart", start)