[1331768 views]

[]

[ads]

Odi's astoundingly incomplete notes

New entries | Code

Non well-defined time zone in iCal and Outlook

As noted earlier the time zone must always be specified in DTSTART for recurring iCal events. If instead UTC format is used in DTSTART the days of the week in the RRULE is undefined and may lead to unexpected results. I crafted such a not well-defined iCal:

BEGIN:VCALENDAR
PRODID:-//www.odi.ch//Test//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;ROLE=NON-PARTICIPANT:MAILTO:iwontread@despammed.org
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=FALSE;TYPE=INDIVIDUAL:MAILTO:iwontread@despammed.org
DTSTART:20050308T233000Z
DTEND:20050309T003000Z
RRULE:FREQ=WEEKLY;UNTIL=20050329T003000Z;INTERVAL=1;BYDAY=TU;WKST=MO
TRANSP:TRANSPARENT
SEQUENCE:1
UID:1
DTSTAMP:20050305T130637Z
SUMMARY:A not well-defined entry
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

When imported into Outlook 2000 in Zurich (GMT+1:00) the event shows up every Tuesday. The same event with a well-defined timezone looks like:

BEGIN:VCALENDAR
PRODID:-//www.odi.ch//Test//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:GMT
BEGIN:STANDARD
END:STANDARD
DTSTART:19000101T000000
TZOFFSETFROM:0000
TZOFFSETTO:0000
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;ROLE=NON-PARTICIPANT:MAILTO:iwontread@despammed.org
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=FALSE;TYPE=INDIVIDUAL:MAILTO:iwontread@despammed.org
DTSTART;TZID=GMT:20050308T233000
DTEND;TZID=GMT:20050309T003000
RRULE:FREQ=WEEKLY;UNTIL=20050329T003000Z;INTERVAL=1;BYDAY=TU;WKST=MO
TRANSP:TRANSPARENT
SEQUENCE:1
UID:2
DTSTAMP:20050305T130637Z
SUMMARY:A well-defined entry
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

This event correctly appears on every Wednesday when imported into Outlook in Zurich.


posted on 2005-03-05 14:52 UTC in Code | 0 comments | permalink