Reputation: 554
How to format an ICS file attached to an email that automatically sets the time zone correctly in Google Calendar so when the receiving party clicks "add to calendar" it looks like the screenshot below. (appointment set in specific time zone. New York in sample below).
We have played VTZIMEZONE. TZID.
If you want to manually get someone to click a link you can set the querystring "ctz" to value you want.
Below does not work.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Appointment Reminder//EN
X-WR-TIMEZONE:America/New_york
BEGIN:VTIMEZONE
TZID:America/New_york
X-LIC-LOCATION:America/New_york
END:VTIMEZONE
BEGIN:VEVENT
UID:61bb267c4074e
DTSTART;TZID=America/New_york:20211216T180000
SEQUENCE:0
TRANSP:OPAQUE
DTEND;TZID=America/New_york:20211216T210000
DTSTAMP:20221007T192043Z
UID:575af6e9-1a52-4b12-b24c-d6057e0cca60
CREATED:20221007T192043Z
DESCRIPTION:
LOCATION:SomePlace
SEQUENCE:0
STATUS:CONFIRMED
TRANSP:OPAQUE
ORGANIZER;CN=Matthew
SUMMARY:Test Appointment
END:VEVENT
END:VCALENDAR
Upvotes: 0
Views: 858
Reputation: 1762
By default, Google Calendar automatically sets the timezone based on the users location (or pre-set timezone on the calendar settings) as explained here in this article:
Also, the ICS file generated by Google Calendar contains details that will tell you about its creation, the time and location of the event, who organized it and so on and so forth. Mostly, this is used for debugging/troubleshooting purposes, you can parse the information from the ICS file but it cannot automatically set event details.
Upvotes: 0