Prevent from libkolabxml errors on Etc/GMT timezone (Bifrost#T15706)
This commit is contained in:
parent
dc3ea3d942
commit
bbe88f6637
1 changed files with 4 additions and 1 deletions
|
@ -234,7 +234,10 @@ abstract class kolab_format
|
|||
if (!$dateonly)
|
||||
$result->setTime($datetime->format('G'), $datetime->format('i'), $datetime->format('s'));
|
||||
|
||||
if ($tz && in_array($tz->getName(), array('UTC', 'GMT', '+00:00', 'Z'))) {
|
||||
// libkolabxml throws errors on some deprecated timezone names
|
||||
$utc_aliases = array('UTC', 'GMT', '+00:00', 'Z', 'Etc/GMT');
|
||||
|
||||
if ($tz && in_array($tz->getName(), $utc_aliases)) {
|
||||
$result->setUTC(true);
|
||||
}
|
||||
else if ($tz !== false) {
|
||||
|
|
Loading…
Add table
Reference in a new issue