adasd
All checks were successful
Deploy / deploy-staging (push) Successful in 24s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-23 23:47:30 +02:00
parent 563aadbd5d
commit 0b06cae679
2 changed files with 35 additions and 2 deletions

View File

@@ -418,9 +418,21 @@ namespace {
if (!function_exists('nexus_display_timezone_name')) {
function nexus_display_timezone_name(): string
{
$timezone = trim((string) date_default_timezone_get());
$candidates = [
$_COOKIE['desktop_timezone'] ?? null,
$_SESSION['desktop_timezone'] ?? null,
getenv('DESKTOP_TIMEZONE') ?: null,
'Europe/Berlin',
];
return $timezone !== '' ? $timezone : 'Europe/Berlin';
foreach ($candidates as $candidate) {
$timezone = trim((string) $candidate);
if ($timezone !== '' && in_array($timezone, \DateTimeZone::listIdentifiers(), true)) {
return $timezone;
}
}
return 'Europe/Berlin';
}
}