From 5f284abfdca3e7452f160183781e6950613885e3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 22 Mar 2012 14:02:06 +0000 Subject: [PATCH] * Calendar: iCal import via mime-registry (clicking on iCal file in filemanager) displayed event in server- instead of user-time --- calendar/inc/class.calendar_bo.inc.php | 2 +- calendar/inc/class.calendar_uiforms.inc.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 44ec0f9883..f0a7f246bb 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -773,7 +773,7 @@ class calendar_bo foreach ($events as &$event) { // convert timezone id of event to tzid (iCal id like 'Europe/Berlin') - if (!$event['tz_id'] || !($event['tzid'] = calendar_timezones::id2tz($event['tz_id']))) + if (empty($event['tzid']) && (!$event['tz_id'] || !($event['tzid'] = calendar_timezones::id2tz($event['tz_id'])))) { $event['tzid'] = egw_time::$server_timezone->getName(); } diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 66bb4bb2a0..52498a9c6d 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1135,6 +1135,9 @@ class calendar_uiforms extends calendar_ui } else { + // as icaltoegw returns timestamps in server-time, we have to convert them here to user-time + $this->bo->db2data($events, 'ts'); + $event = array_shift($events); if (($existing_event = $this->bo->read($event['uid']))) {