From a0e55cb9b17933f355bbaf773295a2592c950211 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Fri, 9 Feb 2024 15:08:21 +0100 Subject: [PATCH] [Web] fix blank /debug page with invalid timezone --- data/web/debug.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/data/web/debug.php b/data/web/debug.php index 52052f682..9c338009c 100644 --- a/data/web/debug.php +++ b/data/web/debug.php @@ -39,9 +39,13 @@ foreach ($containers as $container => $container_info) { $StartedAt['month'], $StartedAt['day'], $StartedAt['year'])); - $user_tz = new DateTimeZone(getenv('TZ')); - $date->setTimezone($user_tz); - $started = $date->format('r'); + try { + $user_tz = new DateTimeZone(getenv('TZ')); + $date->setTimezone($user_tz); + $started = $date->format('r'); + } catch(Exception $e) { + $started = '?'; + } } else { $started = '?';