diff --git a/infolog/inc/class.infolog_groupdav.inc.php b/infolog/inc/class.infolog_groupdav.inc.php index cde1989340..8ce0756f7e 100644 --- a/infolog/inc/class.infolog_groupdav.inc.php +++ b/infolog/inc/class.infolog_groupdav.inc.php @@ -623,6 +623,7 @@ class infolog_groupdav extends groupdav_handler private function _get_handler() { $handler = new infolog_ical(); + $handler->tzid = false; // as we read server-time timestamps (!= null=user-time), exports UTC times $handler->setSupportedFields('GroupDAV',$this->agent); return $handler; diff --git a/infolog/inc/class.infolog_ical.inc.php b/infolog/inc/class.infolog_ical.inc.php index 810ceb44ba..f5fd9e6b16 100644 --- a/infolog/inc/class.infolog_ical.inc.php +++ b/infolog/inc/class.infolog_ical.inc.php @@ -171,7 +171,6 @@ class infolog_ical extends infolog_bo $vcal->setAttribute('METHOD',$_method); $tzid = $this->tzid; - if ($tzid && $tzid != 'UTC') { // check if we have vtimezone component data for tzid of event, if not default to user timezone (default to server tz) @@ -312,7 +311,7 @@ class infolog_ical extends infolog_bo } if ($taskData['info_enddate']) { - self::setDateOrTime($vevent, 'DUE', $taskData['info_enddate'], false); // export always as date + self::setDateOrTime($vevent, 'DUE', $taskData['info_enddate'], $tzid); } if ($taskData['info_datecompleted']) { @@ -365,6 +364,7 @@ class infolog_ical extends infolog_bo static function setDateOrTime(&$vevent, $attr, $time, $tzid) { $params = array(); + $time_in = $time; if ($tzid) { @@ -395,7 +395,8 @@ class infolog_ical extends infolog_bo $value = array( 'year' => $arr['year'], 'month' => $arr['month'], - 'mday' => $arr['day']); + 'mday' => $arr['day'], + ); $params['VALUE'] = 'DATE'; } else @@ -414,6 +415,7 @@ class infolog_ical extends infolog_bo $value = egw_time::to($time, 'ts'); } } + //error_log(__METHOD__."(, '$attr', ".array2string($time_in).', '.array2string($tzid).') tz='.$tz->getName().', value='.array2string($value).(is_int($value)?date('Y-m-d H:i:s',$value):'')); $vevent->setAttribute($attr, $value, $params); }