Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
Showing only changes of commit 324488f9c4 - Show all commits

View File

@ -30,6 +30,7 @@
XXX usage uniquement experimental pour tests implémentations
"""
from datetime import timezone
import re
import icalendar
@ -249,8 +250,15 @@ def _load_and_convert_ics(formsemestre: FormSemestre) -> list[dict]:
"group_bg_color": group_bg_color, # associée au groupe
"modimpl": modimpl, # False si extracteur non configuré
"edt_module": edt_module, # id module edt non traduit
"heure_deb": event.decoded("dtstart").strftime("%H:%M"),
"heure_fin": event.decoded("dtend").strftime("%H:%M"),
# heures pour saisie abs: en heure LOCALE DU SERVEUR
"heure_deb": event.decoded("dtstart")
.replace(tzinfo=timezone.utc)
.astimezone(tz=None)
.strftime("%H:%M"),
"heure_fin": event.decoded("dtend")
.replace(tzinfo=timezone.utc)
.astimezone(tz=None)
.strftime("%H:%M"),
"jour": event.decoded("dtstart").isoformat(),
"start": event.decoded("dtstart").isoformat(),
"end": event.decoded("dtend").isoformat(),