TimezoneDetect: support comma-separated icingaweb2-tzo cookies
This commit is contained in:
parent
af18334e3e
commit
45168caa37
|
@ -53,7 +53,11 @@ class TimezoneDetect
|
|||
}
|
||||
|
||||
if (Platform::isCli() === false && array_key_exists(self::$cookieName, $_COOKIE)) {
|
||||
list($offset, $dst) = explode('-', $_COOKIE[self::$cookieName]);
|
||||
$cookieValue = $_COOKIE[self::$cookieName];
|
||||
list($offset, $dst) = explode(
|
||||
strpos($cookieValue, ',') === false ? '-' : ',',
|
||||
$cookieValue
|
||||
);
|
||||
$timezoneName = timezone_name_from_abbr('', (int)$offset, (int)$dst);
|
||||
|
||||
self::$success = (bool)$timezoneName;
|
||||
|
|
Loading…
Reference in New Issue