3

Last Fall I replaced the DDay iCal component with iCal.net in a scheduling application. We are in the Central U.S. timezone, and all times in our database are in the local time.

Most of our users take the .ics file produced by iCal.net and import it into their Google Calendars by URL or take the file and import it manually into Outlook. When DST started in March, we noticed that the files imported into Outlook 2016 were off by one hour. Google Calendars continues to show the correct time.

Here's the code where I set the timezone:

MyCal.AddTimeZone(New VTimeZone("America/Chicago"))

A sample .ics file with one event looks like this:

BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION:Assigned Officials: \nAdmin User (222)222-2222\n85 First 85 La
st (222)222-2222\n\n\n\nNotes:\n \nHome: Team 1\nVisitor: Team 2
DTEND;TZID=America/Chicago:20180418T183000
DTSTAMP:20180413T025848Z
DTSTART;TZID=America/Chicago:20180418T173000
LOCATION:3401 Williston Rd\, Minnetonka\, Mn  55345
SEQUENCE:0
SUMMARY:PA at Mtka A
UID:d637e18e-7d73-414b-8820-c6696c096d99
END:VEVENT
END:VCALENDAR

This game will successfully show up in Google Calendar as a 17:30 start, but if the .ics file is imported into Outlook it will show an 18:30 start.

MDApache6
  • 71
  • 6
  • Try using a time zone that Windows and Outlook will understand, like `Central Standard Time`. ical.net and Google Calendar understand IANA time zones, but Windows doesn't. – rianjs Apr 13 '18 at 11:42
  • Thanks - that appears to have been the issue. I am sticking with the IANA time zones but using the TimeZoneConverter plugin to make it Windows friendly. – MDApache6 Apr 15 '18 at 15:41
  • This ended up breaking the Google calendars. Using a TZID of "Central Standard Time" caused Google to import all events as GMT. Outlook was correct, however. I did discover that TZID="US/Central" works for both Google and Outlook. This is listed as an alias for "America/Central" here:http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml – MDApache6 May 01 '18 at 03:22

0 Answers0