Fix some offset-naive and offset-aware datetimes error
This commit is contained in:
parent
e8fd423e5f
commit
07c9255040
@ -101,9 +101,9 @@ class IcalModule:
|
|||||||
component["DTEND"] = vDDDTypes(end)
|
component["DTEND"] = vDDDTypes(end)
|
||||||
|
|
||||||
if isinstance(end, datetime):
|
if isinstance(end, datetime):
|
||||||
if end < today:
|
if end.astimezone(pytz.timezone('Europe/Paris')) < today:
|
||||||
continue
|
continue
|
||||||
if toofar is not None and start > toofar:
|
if toofar is not None and start.astimezone(pytz.timezone('Europe/Paris')) > toofar:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if isinstance(end, date) and end < todayd:
|
if isinstance(end, date) and end < todayd:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user