Sanjay Rathod
Sanjay Rathod

Reputation: 1143

How to set time zone calendar event?

Here is my ical code

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
VERSION:2.0
X-WR-TIMEZONE:America/Chicago
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Central Standard Time
BEGIN:STANDARD
DTSTART:20091101T020000Z
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0900
TZOFFSETTO:-0700
TZNAME:Central Standard Time
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20090301T020000Z
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0900
TZOFFSETTO:-0700
TZNAME:Central Standard Time
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN="Support cajunlodging":MAILTO:[email protected]
ATTENDEE;CN="ticket";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[email protected]
LAST-MODIFIED:20151222T054744Z
UID:[email protected]
DTSTAMP:20151222T54744
DTSTART:20151222T054500Z
DTEND:20151223T180000
TRANSP:OPAQUE
SEQUENCE:1
SUMMARY:[Hampton Inn/58/#529] Event
LOCATION:Hampton Inn
CLASS:PUBLIC
PRIORITY:5
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

I want to set timezone same for all email address. I have created two email address with different timezones in gmail. One email address has IST timezone while other has Central timezone. When I am sending this calendar event via php i get different timezone. I want same timezone for both the email address as central timezone. So how can I do this?

Upvotes: 2

Views: 1453

Answers (1)

Michael
Michael

Reputation: 35351

Probably the easiest thing to do would be to format all your times in UTC. Then, when someone receives the event in Gmail, Gmail should automatically convert from UTC to whatever the person's timezone is set to in Gmail's settings.

UTC times end in "Z" and do not need a VTIMEZONE component. The following property uses UTC time:

DTSTART:20151222T054500Z

Upvotes: 4

Related Questions