mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
default to user timezone on export, if event has no or invalid timezone
This commit is contained in:
parent
cc4dad81de
commit
755a9bdf39
@ -309,7 +309,15 @@ class calendar_ical extends calendar_boupdate
|
||||
|
||||
if (!isset(self::$tz_cache[$event['tzid']]))
|
||||
{
|
||||
self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
|
||||
try {
|
||||
self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
// log unknown timezones
|
||||
if (!empty($event['tzid'])) __egw_log_exception($e);
|
||||
// default for no timezone and unkown to user timezone
|
||||
self::$tz_cache[$event['tzid']] = Api\DateTime::$user_timezone;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->so->isWholeDay($event)) $event['whole_day'] = true;
|
||||
@ -2488,7 +2496,7 @@ class calendar_ical extends calendar_boupdate
|
||||
$component->getAllAttributes('DTEND'),
|
||||
$component->getAllAttributes('DURATION')) as $attributes)
|
||||
{
|
||||
error_log(__METHOD__."() attribute=".array2string($attributes));
|
||||
//error_log(__METHOD__."() attribute=".array2string($attributes));
|
||||
switch ($attributes['name'])
|
||||
{
|
||||
case 'DTSTART':
|
||||
|
Loading…
Reference in New Issue
Block a user