Question

I've had some luck getting outlook to accept my .ics files via email and interpret them as calendar invites but I'm running into problems with time zones.

Initially, I discovered that if all my dates are supplied in UTC, Outlook does the right thing (the right thing being to convert the times to my system's time zone setting when it displays the event). Here's the iCalendar file:

BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
BEGIN:VEVENT
ATTENDEE;CN=MIke;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CUTYPE=IND
 IVIDUAL;RSVP=TRUE:MAILTO:mike@host.com
DESCRIPTION:df
DTEND:20120924T230000Z
DTSTAMP:20120924T221102Z
DTSTART:20120924T223000Z
LAST-MODIFIED:20120924T221102Z
ORGANIZER;CN=Buddy Boy:MAILTO:buddyboy@host.com
SEQUENCE:0
SUMMARY:dasdfasdf
UID:cfa64be5-e731-4209-bef9-bf178432ae57
END:VEVENT
END:VCALENDAR

Unfortunately, when I add a recurring event, for some reason outlook won't do this. So, I tried to add a time zone to my iCalendar file using:

_calendar.AddTimeZone(myTimeZone);

The odd thing is that the attachment shows up as "not supported calendar event.ics", however when I open the attachment, Outlook interprets the file just fine (for the most part).

Here's the iCalendar file:

BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART;VALUE=DATE:18000101
RRULE:FREQ=YEARLY;BYDAY=SU;BYHOUR=2;BYMINUTE=0;BYMONTH=10;BYMONTHDAY=25,26,
 27,28,29,30,31
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART;VALUE=DATE:18000101
RRULE:FREQ=YEARLY;BYDAY=SU;BYHOUR=2;BYMINUTE=0;BYMONTH=4;BYMONTHDAY=1,2,3,4
 ,5,6,7
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
BEGIN:STANDARD
DTSTART;VALUE=DATE:20070101
RRULE:FREQ=YEARLY;BYDAY=SU;BYHOUR=2;BYMINUTE=0;BYMONTH=11;BYMONTHDAY=1,2,3,
 4,5,6,7
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART;VALUE=DATE:20070101
RRULE:FREQ=YEARLY;BYDAY=SU;BYHOUR=2;BYMINUTE=0;BYMONTH=3;BYMONTHDAY=8,9,10,
 11,12,13,14
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN=MIke;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CUTYPE=IND
 IVIDUAL;RSVP=TRUE:MAILTO:mike@host.com
DESCRIPTION:sadf
DTEND:20120924T190000
DTSTAMP:20120924T221645Z
DTSTART:20120924T183000
LAST-MODIFIED:20120924T221645Z
ORGANIZER;CN=Buddy Boy:MAILTO:buddyboy@host.com
SEQUENCE:0
SUMMARY:sdfadsfadsf
UID:61a57e06-7b6c-41fa-a640-1b217715e905
END:VEVENT
END:VCALENDAR

Does anyone know what part of this file outlook is having the problem with? Or, perhaps more importantly, does anyone know what I can do in dday.iCal in order to make outlook happy?

Thanks!

Was it helpful?

Solution

first, you have to use the TZID identifier so the calendering know which timezone the event is and not the calendar

http://tools.ietf.org/html/rfc5545#section-3.2.19

which will lead to changing your DTSTART

from:

DTSTART:20120924T183000

to:

DTSTART;TZID=Eastern Standard Time:19980119T020000

Then you should also change your timezone definition (and especially RRULE, DTSTART) from:

DTSTART;VALUE=DATE:18000101
RULE:FREQ=YEARLY;BYDAY=SU;BYHOUR=2;BYMINUTE=0;BYMONTH=10;BYMONTHDAY=25,26,27,28,29,30,31

to:

BEGIN:VTIMEZONE
TZID:Eastern Standard Time
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19671029T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19870405T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE

`

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top