Set alarm date/time in UTC
This commit is contained in:
parent
6fe30d09c6
commit
2559d6ffb7
2 changed files with 7 additions and 2 deletions
|
@ -75,7 +75,9 @@ abstract class kolab_format
|
|||
if (!$dateonly)
|
||||
$result->setTime($datetime->format('G'), $datetime->format('i'), $datetime->format('s'));
|
||||
|
||||
if ($tz)
|
||||
if ($tz && $tz->getName() == 'UTC')
|
||||
$result->setUTC(true);
|
||||
else if ($tz)
|
||||
$result->setTimezone($tz->getName());
|
||||
}
|
||||
|
||||
|
@ -101,6 +103,9 @@ abstract class kolab_format
|
|||
$tz = new DateTimeZone($tzs);
|
||||
$d->setTimezone($tz);
|
||||
}
|
||||
else if ($cdt->isUTC()) {
|
||||
$d->setTimezone(new DateTimeZone('UTC'));
|
||||
}
|
||||
}
|
||||
catch (Exception $e) { }
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ class kolab_format_event extends kolab_format
|
|||
}
|
||||
|
||||
if (preg_match('/^@(\d+)/', $offset, $d)) {
|
||||
$alarm->setStart(self::get_datetime($d[1]));
|
||||
$alarm->setStart(self::get_datetime($d[1], new DateTimeZone('UTC')));
|
||||
}
|
||||
else if (preg_match('/^([-+]?)(\d+)([SMHDW])/', $offset, $d)) {
|
||||
$days = $hours = $minutes = $seconds = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue