You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a event starts and ends at midnight on the same day (coming from an external iCal that you cant change), the event is not shown in the Calendar on that day, because for iCal it´s expired.
I changed the init.py to:
def _ical_event_dict(self, start, end, from_date, event):
"""Ensure that events are within the start and end."""
# Skip this event if it's in the past
if end.date() < from_date.date():
_LOGGER.debug("This event has already ended")
return None
# Check if start date is equal to end date, and both start and end hour are 0
if (
start.date() == end.date()
and start.hour == 0
and start.minute == 0
and end.hour == 0
and end.minute == 0
):
# Set end hour to 23
end = end.replace(hour=23, minute=59, second=59)
# Ignore events that ended this midnight.
if (
end.date() == from_date.date()
and end.hour == 0
and end.minute == 0
and end.second == 0
):
_LOGGER.debug("This event has already ended")
return None
_LOGGER.debug(
"Start: %s Tzinfo: %s Default: %s StartAs %s",
str(start),
str(start.tzinfo),
dt.DEFAULT_TIME_ZONE,
start.astimezone(dt.DEFAULT_TIME_ZONE),
)
event_dict = {
"summary": event.get("SUMMARY", "Unknown"),
"start": start.astimezone(dt.DEFAULT_TIME_ZONE),
"end": end.astimezone(dt.DEFAULT_TIME_ZONE),
"location": event.get("LOCATION"),
"description": event.get("DESCRIPTION"),
"all_day": self.all_day,
}
_LOGGER.debug("Event to add: %s", str(event_dict))
return event_dict
Now all events where start- and endtime is 00:00 at the same day, are changed to 00:00 - 23:59 and will be shown on the due date
The text was updated successfully, but these errors were encountered:
criticallimit
changed the title
All day event not working
Events with start-and endtime 00:00 at the same day are always expired and not shown
Sep 17, 2023
criticallimit
changed the title
Events with start-and endtime 00:00 at the same day are always expired and not shown
Events with start-and endtime 00:00 at the same day are not shown on due day
Sep 17, 2023
If a event starts and ends at midnight on the same day (coming from an external iCal that you cant change), the event is not shown in the Calendar on that day, because for iCal it´s expired.
I changed the init.py to:
Now all events where start- and endtime is 00:00 at the same day, are changed to 00:00 - 23:59 and will be shown on the due date
The text was updated successfully, but these errors were encountered: