Add datetime support

This commit is contained in:
Valentin Moguérou 2024-05-07 00:58:47 +02:00
parent 20c2e68797
commit 21ef5140f0
1 changed files with 1 additions and 2 deletions

View File

@ -36,8 +36,7 @@ def to_calendar(student, term, include_EDT: bool = True):
summary = f"Colle {colle.slot.subject} ({colle.slot.colleur})" summary = f"Colle {colle.slot.subject} ({colle.slot.colleur})"
event.add("summary", summary) event.add("summary", summary)
start = colle.datetime start = colle.datetime.astimezone(pytz.timezone(LOCAL_TZ))
print(start)
fin = start + colle.slot.duration fin = start + colle.slot.duration
event.add("dtstart", start) event.add("dtstart", start)