From 046609d8510fde9d53879331064d3cbb001fb456 Mon Sep 17 00:00:00 2001 From: alpeb Date: Tue, 24 Aug 2004 19:43:19 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20wrong=20time=20when=20exporting=20to=20?= =?UTF-8?q?vcal.=20Also=20changed=20ical=20versi=EF=BF=BD=EF=BF=BDn=20from?= =?UTF-8?q?=202.0=20to=201.0=20because=20outlook=202000=20was=20rejecting?= =?UTF-8?q?=20icals=20with=20this=20version.=20Shouldn't=20I=20have=20chan?= =?UTF-8?q?ged=20this=20version=20number=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calendar/inc/class.boicalendar.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.boicalendar.inc.php b/calendar/inc/class.boicalendar.inc.php index 9eae617ccc..98258547ae 100755 --- a/calendar/inc/class.boicalendar.inc.php +++ b/calendar/inc/class.boicalendar.inc.php @@ -3375,7 +3375,7 @@ $ical = $this->new_ical(); $this->set_var($ical['prodid'],'value','-//eGroupWare//eGroupWare '.$setup_info['calendar']['version'].' MIMEDIR//'.strtoupper($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])); - $this->set_var($ical['version'],'value','2.0'); + $this->set_var($ical['version'],'value','1.0'); $this->set_var($ical['method'],'value',strtoupper($method)); if(!$GLOBALS['phpgw_info']['flags']['included_classes']['uicalendar']) @@ -3419,10 +3419,10 @@ } } - // use system's date info for caluculating local timezone's offset in minutes - // - $gmt_offset = date('O',$GLOBALS['phpgw']->datetime->users_localtime); // offset to GMT - $offset = (int)(substr($gmt_offset, 0, 3)) * 60 + (int)(substr($gmt_offset, 3, 2)); + // $event has times in user's time zone, so have to adjust them to GMT, which is used by ical + // To do that one must substract the users time zone difference with the server and then substract the server's time zone difference with GMT + $gmt_offset = date('O'); // server's offset to GMT + $offset = ((int)(substr($gmt_offset, 0, 3)) + $GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']) * 60 + (int)(substr($gmt_offset, 3, 2)); $event['start']['min'] -= $offset; $event['end']['min'] -= $offset; $event['modtime']['min'] -= $offset;