hi i am generating even from php using ics vacalendar , but when event generate in gamil it change the time for correcting time i have added +0500 as i am in pakistan then it shows correct time what i want i dnt want to use any time zone i want to create event in gmail at that time which i am posting in DTSTART and DTEND without anytimezone
here is my code
$ical = 'BEGIN:VCALENDAR' . "
" .
'PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN' . "
" .
'VERSION:2.0' . "
" .
'METHOD:REQUEST' . "
" .
'BEGIN:VTIMEZONE' . "
" .
'TZID:Eastern Time' . "
" .
'BEGIN:STANDARD' . "
" .
'DTSTART:20091101T020000' . "
" .
'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11' . "
" .
'TZOFFSETFROM:+0500' . "
" .
'TZOFFSETTO:+0500' . "
" .
'TZNAME:UTC' . "
" .
'END:STANDARD' . "
" .
'BEGIN:DAYLIGHT' . "
" .
'DTSTART:20090301T020000' . "
" .
'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3' . "
" .
'TZOFFSETFROM:+0500' . "
" .
'TZOFFSETTO:+0500' . "
" .
'TZNAME:TZID' . "
" .
'END:DAYLIGHT' . "
" .
'END:VTIMEZONE' . "
" .
'BEGIN:VEVENT' . "
" .
'ORGANIZER;CN="'.$from_name.'":MAILTO:'.$from_address. "
" .
'LAST-MODIFIED:' . date("YmdTGis") . "
" .
'UID:'.date("YmdTGis", strtotime($startTime)).rand()."@".$domain."
" .
'DTSTAMP:'.date("YmdTGis"). "
" .
'DTSTART;TZID=UTC:'.date("YmdTHis", strtotime($startTime)). "
" .
'DTEND;TZID=UTC:'.date("YmdTHis", strtotime($endTime)). "
" .
'TRANSP:OPAQUE'. "
" .
'SEQUENCE:1'. "
" .
'SUMMARY:' . $subject . "
" .
'LOCATION:' . $location . "
" .
'CLASS:PUBLIC'. "
" .
'PRIORITY:5'. "
" .
'BEGIN:VALARM' . "
" .
'TRIGGER:-PT15M' . "
" .
'ACTION:DISPLAY' . "
" .
'DESCRIPTION:Reminder' . "
" .
'END:VALARM' . "
" .
'END:VEVENT'. "
" .
'END:VCALENDAR'. "
";
See Question&Answers more detail:os