From be31e4ea584a687a3a6929902f3d00671c6f6748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 8 Feb 2022 21:51:55 +0100 Subject: [PATCH] Get TZ info from ENV in docker or date command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- settings.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/settings.php b/settings.php index a5119480..543dd56d 100644 --- a/settings.php +++ b/settings.php @@ -19,6 +19,12 @@ if(isset($last_error) && ($last_error["type"] === E_WARNING || $last_error["type $error .= "There was a problem applying your settings.
Debugging information:
PHP error (".htmlspecialchars($last_error["type"])."): ".htmlspecialchars($last_error["message"])." in ".htmlspecialchars($last_error["file"]).":".htmlspecialchars($last_error["line"]); } +# Timezone is set in docker via ENV otherwise get it from commandline +$timezone=getenv("TZ"); +if (empty($timezone)) { + $timezone=shell_exec("date +'%Z'"); +} + ?>