diff --git a/icalendar_timeseries_server/cal.py b/icalendar_timeseries_server/cal.py index 8db89b5..e4e479a 100644 --- a/icalendar_timeseries_server/cal.py +++ b/icalendar_timeseries_server/cal.py @@ -26,6 +26,8 @@ def _parse_recurring(event: cal.Event, start: datetime, end: datetime, duration: occurences: List[datetime] = [] evstart = event.get('dtstart').dt + if isinstance(evstart, date) and not isinstance(evstart, datetime): + evstart = datetime(evstart.year, evstart.month, evstart.day, tzinfo=start.tzinfo) # First occurence lies in the future; no need to process further if evstart >= end: return occurences