question

HFloyd avatar image
0 Votes"
HFloyd asked HFloyd answered

Outlook Desktop not reading standards-compliant ICS file timezone correctly

I am working on an application which generates .ICS calendar files for events. When I test opening a generated event, the timezone data is ignored by outlook, and assumed (incorrectly) to be my computer's local timezone - hence the times are incorrect on the calendar if the event is saved.

For example, this test event is set to US Mountain Time (UTC-6), 10:00 AM - 11:00 AM. When I open it via Outlook on my computer (which is US Eastern Time (UTC-4)), it is showing the event occurring at 10:00 AM - 11:00 AM Eastern Time, which is incorrect.
193253-image.png

Here is the content of the ICS file. This passes the Validator at https://icalendar.org/validator.html which is based on the RFC 5545 specification.

BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Denver
X-LIC-LOCATION:America/Denver
BEGIN:STANDARD
DTSTART:20201101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZNAME:MST
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20210314T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZNAME:MDT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION:
DTEND:20220415T110000
DTSTAMP:20220414T190522Z
DTSTART:20220415T100000
LOCATION:
PRIORITY:5
SEQUENCE:0
SUMMARY:Event Test - Mountain Time
UID:d36af76c-1914-43a2-bb04-84e714a157c3
X-ALT-DESC;FMTTYPE=text/html:
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Reminder
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

If, in Outlook, I manually adjust the timezone on the calendar item:
193180-image.png
193234-image.png

and Save it, it appears in the correct place on my (Eastern Time) calendar (shifted by 2 hours):
193212-image.png


If I then "Save As..." this edited calendar entry as an ICS file and open it, this is its contents:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Mountain Standard Time
BEGIN:STANDARD
DTSTART:16011104T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010311T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20220414T191551Z
DTEND;TZID="Mountain Standard Time":20220415T110000
DTSTAMP:20220414T190522Z
DTSTART;TZID="Mountain Standard Time":20220415T100000
LAST-MODIFIED:20220414T191551Z
PRIORITY:5
SEQUENCE:0
SUMMARY;LANGUAGE=en-us:Event Test - Mountain Time
TRANSP:OPAQUE
UID:d36af76c-1914-43a2-bb04-84e714a157c3
X-ALT-DESC;FMTTYPE=text/html:
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

The main differences I notice are that the timezone data stored is not the IANA standard, but rather the Microsoft "TimeZoneInfo" name ("Mountain Standard Time" rather than "America/Denver").

Additionally, this is flagged when testing it via the Validator tool:
193187-image.png


Why doesn't Outlook recognize IANA timezones? Why doesn't Outook follow the ICS standard?



office-outlook-itprooffice-vba-dev
image.png (18.1 KiB)
image.png (29.4 KiB)
image.png (18.1 KiB)
image.png (3.9 KiB)
image.png (37.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HFloydFloydInnovationsLLC-8428 ,
According to your description, seems that you are encountering issue about development, please kindly understand the tag” office-outlook-itpro” which mainly focus on general issues about Outlook client. In order to better resolve your problem, I will add the tag” office-vba-dev”, so that users of their forum can help to see it together.


Thanks for your understanding and hope your issue would be resolved soon.

0 Votes 0 ·

Thank you for your reply FaeryFu, The issue is less about development than about why Outlook as a software product doesn't seem to follow established specification standards for a file type it supposedly supports. I do appreciate the additional tagging, however, as the more eyes who see this, the better.

0 Votes 0 ·

1 Answer

HFloyd avatar image
0 Votes"
HFloyd answered

After more research and testing, I have found that if the ICS file includes the TZID information with the DTSTART and DTEND values, Outlook seems to properly convert the time to the local timezone. It does not "recognize" that the event is in "Mountain Time" in terms of the UI, but the event will be placed on the calendar in the proper timeslot, which is the most important thing:

193465-image.png

This is the content of the ICS:

BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Denver
X-LIC-LOCATION:America/Denver
BEGIN:STANDARD
DTSTART:20201101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZNAME:MST
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20210314T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZNAME:MDT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION:
DTEND;TZID=America/Denver:20220415T110000 <--- LOOK HERE
DTSTAMP:20220415T162432Z
DTSTART;TZID=America/Denver:20220415T100000 <--- LOOK HERE
LOCATION:
PRIORITY:5
SEQUENCE:0
SUMMARY:Event Test - Mountain Time
UID:6159875a-45e3-4ce7-a082-118f71cb9e35
X-ALT-DESC;FMTTYPE=text/html:
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Reminder
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR



image.png (15.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.