forked from ScoDoc/ScoDoc
Assiduité : calendrier fix str_to_time
This commit is contained in:
parent
c960d943d2
commit
f242fee5ff
@ -2361,6 +2361,9 @@ class Jour:
|
|||||||
heure_matin = scass.str_to_time(
|
heure_matin = scass.str_to_time(
|
||||||
ScoDocSiteConfig.get("assi_morning_time", "08:00")
|
ScoDocSiteConfig.get("assi_morning_time", "08:00")
|
||||||
)
|
)
|
||||||
|
log(
|
||||||
|
f'{ScoDocSiteConfig.get("assi_morning_time", "08:00")=}{heure_matin=} {type(heure_matin)=}'
|
||||||
|
)
|
||||||
matin = (
|
matin = (
|
||||||
# date debut
|
# date debut
|
||||||
scu.localize_datetime(
|
scu.localize_datetime(
|
||||||
@ -2447,15 +2450,11 @@ class Jour:
|
|||||||
Génère la minitimeline du jour
|
Génère la minitimeline du jour
|
||||||
"""
|
"""
|
||||||
# Récupérer le référenciel de la timeline
|
# Récupérer le référenciel de la timeline
|
||||||
scass.str_to_time = lambda x: _time_to_timedelta(
|
heure_matin: datetime.timedelta = _time_to_timedelta(
|
||||||
datetime.time(*list(map(int, x.split(":"))))
|
scass.str_to_time(ScoDocSiteConfig.get("assi_morning_time", "08:00"))
|
||||||
)
|
)
|
||||||
|
heure_soir: datetime.timedelta = _time_to_timedelta(
|
||||||
heure_matin: datetime.timedelta = scass.str_to_time(
|
scass.str_to_time(ScoDocSiteConfig.get("assi_afternoon_time", "17:00"))
|
||||||
ScoDocSiteConfig.get("assi_morning_time", "08:00")
|
|
||||||
)
|
|
||||||
heure_soir: datetime.timedelta = scass.str_to_time(
|
|
||||||
ScoDocSiteConfig.get("assi_afternoon_time", "17:00")
|
|
||||||
)
|
)
|
||||||
# longueur_timeline = heure_soir - heure_matin
|
# longueur_timeline = heure_soir - heure_matin
|
||||||
longueur_timeline: datetime.timedelta = heure_soir - heure_matin
|
longueur_timeline: datetime.timedelta = heure_soir - heure_matin
|
||||||
|
Loading…
Reference in New Issue
Block a user