forked from ScoDoc/ScoDoc
assiduites : bug fix localize aware datetime
This commit is contained in:
parent
b9554cd6b5
commit
3c227562ff
@ -221,7 +221,8 @@ def localize_datetime(date: datetime.datetime or str) -> datetime.datetime:
|
|||||||
date = is_iso_formated(date, convert=True)
|
date = is_iso_formated(date, convert=True)
|
||||||
|
|
||||||
new_date: datetime.datetime = date
|
new_date: datetime.datetime = date
|
||||||
new_date = timezone("Europe/Paris").localize(date)
|
if new_date.tzinfo is None:
|
||||||
|
new_date = timezone("Europe/Paris").localize(date)
|
||||||
return new_date
|
return new_date
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user