php - icalendar event timezone not matching time with user timezone -
i sending event ms outlook through mail, event time different have send.
i want support icalender event application ms outlook, google calendar ..etc
any resource or api implement icalendar event let me know. e.g
sending :
start time : 12:40 p.m. end time : 01:00 p.m.
at user end, outlook shows event after 1 hour.
start time : 01:40 p.m. end time : 02:00 p.m.
i want same result sending.
below icalendar code.
$ical = 'begin:vcalendar' . "\r\n" . 'prodid:-//microsoft corporation//outlook 10.0 mimedir//en' . "\r\n" . 'version:2.0' . "\r\n" . 'method:request' . "\r\n" . 'begin:vtimezone' . "\r\n" . 'tzid:'.date_default_timezone_get() . "\r\n" . 'begin:standard' . "\r\n" . 'dtstart:20091101t020000' . "\r\n" . 'rrule:freq=yearly;interval=1;byday=1su;bymonth=11' . "\r\n" . 'tzoffsetfrom:-0400' . "\r\n" . 'tzoffsetto:-0500' . "\r\n" . 'tzname:est' . "\r\n" . 'end:standard' . "\r\n" . 'begin:daylight' . "\r\n" . 'dtstart:20090301t020000' . "\r\n" . 'rrule:freq=yearly;interval=1;byday=2su;bymonth=3' . "\r\n" . 'tzoffsetfrom:-0500' . "\r\n" . 'tzoffsetto:-0400' . "\r\n" . 'tzname:edst' . "\r\n" . 'end:daylight' . "\r\n" . 'end:vtimezone' . "\r\n" . 'begin:vevent' . "\r\n" . 'organizer;cn="'.$from_name.'":mailto:'.$from_address. "\r\n" . 'attendee;cn="'.$to_name.'";role=req-participant;rsvp=true:mailto:'.$to_address. "\r\n" . 'last-modified:' . date("ymd\tgis") . "\r\n" . 'uid:'.date("ymd\tgis", strtotime($starttime)).rand()."@".$domain."\r\n" . 'dtstamp:'.date("ymd\tgis"). "\r\n" . 'dtstart;tzid="'.date_default_timezone_get().'":'.date("ymd", strtotime($starttime))."t".date("his", strtotime($starttime)). "\r\n" . 'dtend;tzid="'.date_default_timezone_get().'":'.date("ymd", strtotime($endtime))."t".date("his", strtotime($endtime)). "\r\n" . 'transp:opaque'. "\r\n" . 'sequence:1'. "\r\n" . 'summary:' . $subject . "\r\n" . 'class:public'. "\r\n" . 'priority:5'. "\r\n" . 'begin:valarm' . "\r\n" . 'trigger:-pt15m' . "\r\n" . 'action:display' . "\r\n" . 'description:reminder' . "\r\n" . 'end:valarm' . "\r\n" . 'end:vevent'. "\r\n" . 'end:vcalendar'. "\r\n";
what in tzid
parameter needs match in tzid
in vtimezone
object.
Comments
Post a Comment