I'm creating an iCal feed using DDay.iCal. It works, but I can't figure out how to set the timezone for the feed. Here's the basic code:
iCalendar iCal = new iCalendar();
// <-- Set the Timezone HERE to PST (Pacific Daylight Time)
Event evt = iCal.Create<Event>();
evt.Start = new iCalDateTime(meeting.MeetDate);
evt.End = evt.Start.AddHours(4); // 4 hour event
evt.Description = "This meeting...";
evt.Summary = "Event Summary";
Any ideas?
Example6 in the download is setting timezones and whatnot for events. Check that out.
Relevant lines:
In the other answer, the author fails to mention the line above those three lines that's in example 6:
So that won't work. An option would be:
Or simply add the local timezone:
To find all registered timezones, use this snippet: