Fix some offset-naive and offset-aware datetimes error

This commit is contained in:
nemunaire 2023-04-30 09:22:03 +02:00
parent e8fd423e5f
commit 07c9255040
1 changed files with 2 additions and 2 deletions

View File

@ -101,9 +101,9 @@ class IcalModule:
component["DTEND"] = vDDDTypes(end)
if isinstance(end, datetime):
if end < today:
if end.astimezone(pytz.timezone('Europe/Paris')) < today:
continue
if toofar is not None and start > toofar:
if toofar is not None and start.astimezone(pytz.timezone('Europe/Paris')) > toofar:
continue
else:
if isinstance(end, date) and end < todayd: