* Calendar: iCal import via mime-registry (clicking on iCal file in filemanager) displayed event in server- instead of user-time

This commit is contained in:
Ralf Becker 2012-03-22 14:02:06 +00:00
parent d3cd7ea65b
commit 5f284abfdc
2 changed files with 4 additions and 1 deletions

View File

@ -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();
}

View File

@ -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'])))
{