Events: All-day events have start/end time in ical feed

Events: All-day events have start/end time in ical feed
0

Steps to Reproduce

Subscribe to a calendar using the iCal feed provided on the Calendar tab. All day events on this calendar have a start time of 00:00 and an end time of 24:00. (This is different from the ics export for such events, which does not include start/end times.) This makes my calendar look crowded, because the all-day events don’t group with other all-day events at the top.

Example

Event exported from calendar subscription on Apple Calendar app:

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
X-WR-CALNAME:Event Title
METHOD:PUBLISH
PRODID:-//Apple Inc.//Mac OS X 10.14.5//EN
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
DTSTART:20070311T020000
TZNAME:EDT
TZOFFSETTO:-0400
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
DTSTART:20071104T020000
TZNAME:EST
TZOFFSETTO:-0500
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
TRANSP:OPAQUE
DTEND;TZID=America/New_York:20190929T000000
UID:362d3649-ef19-42f9-ab35-5acd62a686e0
DTSTAMP:20190723T174753Z
DESCRIPTION:This exhibition focuses on (...) in service of grassroots 
 movements and/or co&hellip\;
URL;VALUE=URI:Event URL
SEQUENCE:0
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
SUMMARY:Event Title
LAST-MODIFIED:20190723T174753Z
CREATED:20190723T174753Z
DTSTART;TZID=America/New_York:20190711T000000
END:VEVENT
END:VCALENDAR

Same event exported using “Add to calendar” button:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
URL:Event URL
DTSTART:20190711
DTEND:20190930
SUMMARY:Event Title
DESCRIPTION:
LOCATION:Event Location
END:VEVENT
END:VCALENDAR

Logs

1 Like

@fzngagan When we address this issue, we should also assess whether we need to add “all_day” as a property that should increment the event version.

1 Like

Yes, sure.

Also, we need to discuss about adding timezone field to all day events.Currently, the timezone selector is disabled when the all day checkbox is checked. I think we probably need timezone even for all day events because that day occurs at different times in different places. Also, can we utilize DateOrDateTime class from icalendar gem to generalize the two cases where time is present and when its not.

I don’t think that’s necessary. See the second example above, the “add to calendar” export. It works just fine without time zones.

1 Like

I’ll take a look at this one tomorrow. Thanks for the lead though.

Yes you’re right. It works fine while using add to calendar. I’m taking a look to see if I can find the issue and fix it.

Ok I was able to get to the bottom of this. The reason this was happening was because in case of all day events, time was also being set as T0000 which icalendar would still consider as datetime. I’m making a PR for this.

1 Like

Here’s a PR that fixes this one and Review events datetime change

2 Likes

@fzngagan Great, sleuthing :+1:

This is done.

2 Likes