fixing r37108 calendar_timezone::DateTimeZone() returns a DateTimeZone not an egw_time object

This commit is contained in:
Ralf Becker 2011-11-07 17:14:15 +00:00
parent 687ce3f13b
commit 54b2adf10b

View File

@ -2304,7 +2304,7 @@ class calendar_ical extends calendar_boupdate
$tz = calendar_timezones::DateTimeZone($attributes['params']['TZID']);
// sometimes we do not get an egw_time object but no exception is thrown
// may be php 5.2.x related. occurs when a NokiaE72 tries to open Outlook invitations
if ($tz instanceof egw_time)
if ($tz instanceof DateTimeZone)
{
$event['tzid'] = $tz->getName();
}
@ -2312,7 +2312,7 @@ class calendar_ical extends calendar_boupdate
{
error_log(__METHOD__ . '() unknown TZID='
. $attributes['params']['TZID'] . ', defaulting to timezone "'
. date_default_timezone_get() . '".');
. date_default_timezone_get() . '".'.array2string($tz));
$event['tzid'] = date_default_timezone_get(); // default to current timezone
}
}
@ -2320,7 +2320,7 @@ class calendar_ical extends calendar_boupdate
{
error_log(__METHOD__ . '() unknown TZID='
. $attributes['params']['TZID'] . ', defaulting to timezone "'
. date_default_timezone_get() . '".');
. date_default_timezone_get() . '".'.$e->getMessage());
$event['tzid'] = date_default_timezone_get(); // default to current timezone
}
}