Reputation: 71
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.
Upvotes: 3
Views: 1390