ICS (iCalendar) UID purpose and use

user1004147 picture user1004147 · Sep 22, 2014 · Viewed 11.5k times · Source

I'm creating a sync adapter towards ICS files in Java, and I have a problem recognizing the same events across new updates towards a remote file which is dynamically created.

So I thought, great I can just use the UID, it turns out it's randomly generated every time the ICS file is downloaded. So what is the point of UID property if it's randomly generated everytime? Why not just assume every ICS event that exists in the universe is unique? Is it the ICS file generators fault for not using the same UID for it's same events (I have seen 2 ICS file providers do this, 2 schools)?

So what's the standard way of recognizing the same event across ICS file updates, instead of wiping the whole calendar and re-importing?

Answer

Auberon Vacher picture Auberon Vacher · Sep 22, 2014

RFC5545 section on UID (link) is aligned with your expectations and unfortunately not with the implementation on the server you are connecting to:

Property Name: UID

Purpose: This property defines the persistent, globally unique identifier for the calendar component.

Unfortunately there is nothing really which can be done against bad server side implementations...