Search code examples
icalendar

Publishing frequently changing iCalendar via METHOD:PUBLISH in combination with SEQUENCE


I am using the ical-generator library to publish an iCalendar feed. The calendar contains an all-day event, which is a prediction of something happening on a given day. As the prediction gets updated, I want to change the date of the event accordingly.

This is how the feed looks like for an example event on 21 Feb 2021:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
METHOD:PUBLISH
TIMEZONE-ID:Europe/Berlin
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
UID:42
SEQUENCE:26852582
DTSTAMP:20210120T150245Z
DTSTART;VALUE=DATE:20210121
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
SUMMARY:Test
ORGANIZER;CN="XXX":mailto:[email protected]
X-PUBLISHED-TTL:PT1M
LAST-MODIFIED:20210120T150245Z
END:VEVENT
END:VCALENDAR

When I want to update the event, I am using the same UID but update DTSTART and SEQUENCE (I am using "minutes since epoch" to be really sure that my sequence numbers are properly reflecting update order).

Now suppose that the prediction changes, and the event must be moved to the next day:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
METHOD:PUBLISH
TIMEZONE-ID:Europe/Berlin
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
UID:42
SEQUENCE:26852583
DTSTAMP:20210120T150309Z
DTSTART;VALUE=DATE:20210122
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
SUMMARY:Test
ORGANIZER;CN="XXX":mailto:[email protected]
X-PUBLISHED-TTL:PT1M
LAST-MODIFIED:20210120T150309Z
END:VEVENT
END:VCALENDAR

Note:

  • UID is the same
  • DTSTART is now 22 Feb 2021
  • SEQUENCE is incremented by 1 (minute)

All major clients (Outlook Web Acccess, Google Calendar, Apple Calendar) properly display the feed, but they don't reflect any updates to the event.

What am I missing?


Solution

  • Turns out that everything is working as expected, but – just as @anmari pointed out in a comment – receiving applications check at their own pace.