Possible timezone parsing error in outlook - outlook

I'm trying to make sure this is a problem with outlook.
I am generating an ics file that specifies the timezone of the event:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:www.example.com
X-WR-TIMEZONE:America/Chicago
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:56bba0729f450
DTSTART;TZID=America/Chicago:20160212T170000
SEQUENCE:0
TRANSP:OPAQUE
DTEND;TZID=America/Chicago:20160212T183000
SUMMARY:Beer-o-clock
CLASS:PUBLIC
DTSTAMP:20160210T144122Z
END:VEVENT
BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
BEGIN:DAYLIGHT
TZNAME:CDT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CST
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
DTSTART:19701101T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
END:VCALENDAR
This invite works, but if you open it in a different timezone (e.g. I'm seeing this when I open it from the Pacific timezone) in outlook it doesn't recognize the timezone change. The timezone change is recognized by other apps like mac os Calendar or Google calendar.
When I rearrange the calendar file so that the VEVENT definition is after the VTIMEZONE definition it does work in outlook:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:www.example.com
X-WR-TIMEZONE:America/Chicago
X-PUBLISHED-TTL:P1W
BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
BEGIN:DAYLIGHT
TZNAME:CDT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CST
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
DTSTART:19701101T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:56bba0729f450
DTSTART;TZID=America/Chicago:20160212T170000
SEQUENCE:0
TRANSP:OPAQUE
DTEND;TZID=America/Chicago:20160212T183000
SUMMARY:Beer-o-clock
CLASS:PUBLIC
DTSTAMP:20160210T144122Z
END:VEVENT
END:VCALENDAR
It seems like this is a parsing error in outlook but I'm not totally sure. I don't know how much control I have over the order in which the ics file is generated without hacking at the vendor code (which I'm hoping not to do).
Is this an outlook specific thing or is there something else wrong with the invite definition?

The iCalendar specifications do not require you to put the VTIMEZONE component at the top. But, of course, people are free to implement the spec however they choose.

While you may not find anything in RFC5545/RFC5546 that would state that VTIMEZONE components have to come before VEVENT, all the examples given in those specifications do put it in that order and the practice is clearly to have VTIMEZONE before VEVENT.
It also simply makes sense from the iCalendar consumer side of things, as the VTIMEZONE TZID is referenced in the VEVENT.
By not following the common practice, you are really asking for trouble. Assuming that you solve your Outlook problem in some other way, you are quite likely to face an interop issue with another client tomorrow. So you are better off fixing your iCalendar stream.

Related

ICal not updating existing event

I have created two ical files, one is ical with method:request, and another one is ical with method cancel. When I import them into my outlook calendar, both of them are creating new event.(If I specify the meeting with the status:CANCELLED it is not updating the existing one, but it's creating new one with cancelled status). Both of the icals have the same UID. Do You know how to change that? Or how to update existing meeting via ical file in outlook. However on google calendar everything works as expected, so I am curious whether outlook has some strange behaviour specified for ical files.
BEGIN:VCALENDAR
METHOD:REQUEST/CANCEL(in cancel ical)
PRODID:prod
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Europe/Warsaw
X-LIC-LOCATION:Europe/Warsaw
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Warsaw:20191231T160000
DTEND;TZID=Europe/Warsaw:20191231T170000
LOCATION:Loc
SUMMARY:summ
DESCRIPTION:description
SEQUENCE:0/1 (in cancel ical)
CLASS:PUBLIC
UID:SAME_UID
DTSTAMP:20191227T090501Z
END:VEVENT
END:VCALENDAR
According to the Spec https://www.rfc-editor.org/rfc/rfc2446#section-3.2.5, a CANCEL to a REQUEST, must include all the attendees:
ATTENDEE 0+ MUST include all "Attendees" being removed
the event. MUST include all "Attendees" if
the entire event is cancelled.
If you don't have attendees, a PUBLISH may be more appropriate. Then any items you remove in this published feed, are removed from the calendar.

ics not updating organizer calendar

I am writing an application that will send out .ics files to be interpreted mainly by outlook. When my applications sends an update, it will successfully update everyone's calendar except for the organizer's calendar. I'm using the same UID and I'm incrementing SEQUENCE each time. Is there anything else that I'm missing in my ICS file or does it not update my calendar because I am the organizer?
Below is an example of the ics code that we're using:
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART:16011104T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010311T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN='test';RSVP=TRUE:mailto:test#testing.com
ATTENDEE;CN='attendee';RSVP=TRUE:mailto:attendee#attendees.com
CLASS:PUBLIC
CREATED:20180628T182531Z
DTSTART;TZID=Eastern Standard Time:20180630T141500
DTEND;TZID=Eastern Standard Time:20180630T160000
DTSTAMP:20180628T182531Z
LAST-MODIFIED:20180628T182531Z
LOCATION:some place
ORGANIZER;CN=Conference Room Board:mailto:test#testing.com
PRIORITY:5
SEQUENCE:1
SUMMARY;LANGUAGE=en-us:test
TRANSP:OPAQUE
UID:SomeUniqueUID
CREATED:20180628T182531Z
DESCRIPTION:Test
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MS-OLK-AUTOFILLLOCATION:TRUE
X-MS-OLK-CONFTYPE:0
END:VEVENT
END:VCALENDAR
Thanks for any help!
This is expected. As the organiser, your client assumes that only itself is in control of invitation. As such it ignores invitations sent by other parties.
You may want to make the organiser also an ATTENDEE but there is no guarantee that this will work.
See Change event description for organizer using VCalendar and When creating an iCal event on behalf of an organizer and email it to him, no "Add to calendar" or "RSVP" wrappers appear
So, you guys are correct and this is expected behavior. I tried adding the organiser as an attendee and ended up running into problems when I tried to create an event cancellation. The organiser would receive the email but be unable to remove from calendar because they were recognized as the organizer.
I ended up abandoning using ICS files and instead started using a library that communicates through Exchange Web Services. EWS allowed me to simulate creating a meeting on someone's calendar through an API and then adding attendees just like I created the meeting in Outlook. Specifically, I was using python so I started using Exchangelib.
I wanted to put an answer to this question for anyone else that may stumble upon this.

ical validates but Exchange server rejects

I'm running out of ideas on what to change to make Exchange accept this ical. Unfortunately, we don't get any messages indicating what is wrong. Last modification was to remove RDATE tags. I thought that resolved the problem, but now this sample is being rejected
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Our/Product Identifier
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VTIMEZONE
TZID:America/Chicago
BEGIN:STANDARD
DTSTART:20151101T010000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20150308T030000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20150715T195751Z
DTSTAMP:20150715T200023Z
LAST-MODIFIED:20150715T200023Z
UID:04000CE00800000838BFD0010000008200E0007400000005B000B2561887101A8200000
010045B0263C63E600CED48900C71000645920EFD
SUMMARY:Test new event
LOCATION:office
DTSTART:20150715T200000Z
DTEND:20150715T210000Z
ORGANIZER;CN=Foo;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:Foo#ba
r.com
STATUS:CONFIRMED
TRANSP:OPAQUE
SEQUENCE:0
END:VEVENT
END:VCALENDAR
It passes all the online ical validators I've tried. This ical is generated in response to a meeting invitation. The meeting invitation is handled without a problem, except that this ical attachment is rejected by the exchange server.
If this is a REPLY to an invitation, then you should have an ATTENDEE property corresponding to the attendee on behalf of whom this REPLY is generated, and an ORGANIZER. See https://www.rfc-editor.org/rfc/rfc5546#section-3.2.3 for the full list of mandatory fields in a REPLY.
It looks like you are mixing the ORGANIZER and ATTENDEE here:
ORGANIZER;CN=Foo;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:Foo#bar.com
Assuming that Foo#bar.com is the attendee who is replying, you should instead have
ATTENDEE;CN=Foo;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:Foo#bar.com
and you should have an ORGANIZER with the same value as in the invitation.
You may want to show us the original invitation to which you are trying to reply to as there are other properties which are linked to the original invitation.

ICS file in Outlook gives "The operation failed." only if I try to Accept/Tentative/Decline before saving

We are creating an iCalendar .ics file in our system so our users can add an appointment to Outlook. A new requirement is that we have the Accept/Tentative/Decline options show up in Outlook along with RSVPs. I am able to achieve this by adding ATTENDEE and ORGANIZER lines to the .ics as follows:
ATTENDEE;RSVP=TRUE:
ORGANIZER;CN="Test Organizer":mailto:test#test.com
However, I'm running into a particular situation where Outlook returns "The operation failed." When I first open the .ics in Outlook, BEFORE it is actually saved into my calendar, if I click Accept/Tentative/Decline at that point, I get "The operation failed." If I do it AFTER it is saved into my calendar, then it works fine (RSVPs send if I delete it, and Accept/Tentative/Decline work exactly as expected). Here is video of that: http://screencast.com/t/BBUzYRwCJ
What am I doing wrong? Have I omitted something important from the .ics file? Here is the full file, which works great except for this one situation:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ICSTestCS/
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:0300
TZOFFSETTO:0200
TZNAME:GMT
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:0200
TZOFFSETTO:0300
TZNAME:GMT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;RSVP=TRUE:
ORGANIZER;CN="Test Organizer":mailto:test#test.com
DTSTART;TZID=Europe/London:20140522T090000
DTEND;TZID=Europe/London:20140522T103000
SUMMARY:Test Course
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Test Course Description
LOCATION:Test Office
UID:1
SEQUENCE:0
DTSTAMP:20140522T090000
END:VEVENT
END:VCALENDAR
I seem to have resolved my issue by including:
METHOD:REQUEST
at the top of the file under VERSION:2.0
You should have a mailto: uri as the ATTENDEE value, e.g.
ATTENDEE;RSVP=TRUE:someattendee#test.com

Is There a Workaround for lack of Olsen TZ TZID Format in ICS File

I recently had a problem with an ICS file that I received in email. My copy of Outlook 2010 would not recognize the timezone correctly. Here is the way that the start time of a meeting was represented in the ICS file:
DTSTART;TZID=America/Los_Angeles:20110928T183000
When Outlook imported this file, it changed the time from 6:30 pm Pacific time to 7:30 pm Pacific time. After some experimentation I was able to get an ICS file that imported correctly in Outlook by changing the time zone format:
DTSTART;TZID="Pacific Time":20110928T183000
After some further research I found that the ICS file specification leaves the question of time zone identification open, but suggests using the Olsen TZ database. It appears that the Microsoft Outlook team has chosen to ignore this suggestion.
Given that Outlook is a fairly popular calendar client, is there a reliable way to format ICS time zones for Outlook that is still compatible with other clients? My biggest concern about this issue is the silent error during the Outlook import. Users could easily show up for a meeting at the wrong time, since Outlook gives no warning that it's confused about the time zone. Should we simply direct Outlook users to a different file format?
Note: I know that this question is similar to an earlier post, but the references on that post appear to have expired, and I'm wondering if there are any better solutions out there.
Hard to judge without the full iCalendar file but did you define/do you have a VTIMEZONE component in your calendar file which defines what America/Los_Angeles should be?
Something like:
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
Instead of adding the timezone definition to the ics file, it would be better to mention the event start/end times in UTC itself.
And then, the consumer of the ICS file - outlook in your case - should be able to do the timezone conversion from UTC(from ics file) to the preferred timezone setting of the end user, just before rendering the meeting event on their calendars.
Pros:
This way you dont have to take care of adding the correct timezone offsets (VTIMEZONE component) yourself.
Plus, the ics file is much smaller, cleaner, easy to read.
References:
Even google seems to be handling timezones in ics this way itself - Google timezone handling
Hope this helps.
Suppose the questioner lives in Los Angeles and uses OUTLOOK2010.
And 20110928T183000 Start time is based on PDT
If you want to make meeting successful, You add Meeting appointment item, contact, and google map URL Address phone open time in description.
Of course, meeting item should add Organizer and Attendee, but it is so hard to set.
And about 75 octet carriage return and inserting space is difficult. So only set organizer and attendee write in description.
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
CALSCALE:GREGORIAN
X-WR-TIMEZONE:America/Los_Angeles
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
X-WR-TIMEZONE:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20110928T183000
DTEND;TZID=America/Los_Angeles:20110928T203000
LOCATION:meeting room in Los Angeles
Description:maps link \nhttp... \n phone \n open at 10:00:AM(PDT)
UID:ev1
ORGANIZER;CN="ThisMeeting Orginizer":mailto:meetingorginer#example.com
Contact:meetingsupport#example.com
DTSTAMP:20111001T105433Z
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Resources