15

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?

Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
user1004147
  • 315
  • 1
  • 2
  • 10

1 Answers1

18

RFC5545 section on UID ([link][1]) 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... [1]: https://www.rfc-editor.org/rfc/rfc5545#section-3.8.4.7

Community
  • 1
  • 1
Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
  • 1
    It gets even more interesting if you just use the email address as the UID and some calendars see all events as the same while some (shame on you, Outlook!) don't – Adam Aug 31 '17 at 12:00