mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
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)) {
|
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);
|
$timezoneName = timezone_name_from_abbr('', (int)$offset, (int)$dst);
|
||||||
|
|
||||||
self::$success = (bool)$timezoneName;
|
self::$success = (bool)$timezoneName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user