From a0ee63381f6bd01487d713e28a10a131357c5a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 5 Feb 2022 16:49:31 +0100 Subject: [PATCH 1/4] Inlcude timezone info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.php b/settings.php index ba933e09..7152ffee 100644 --- a/settings.php +++ b/settings.php @@ -240,6 +240,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "dns", "piho } $FTLversion = exec("/usr/bin/pihole-FTL version"); + $FTLstart = exec("date -r /proc/" . $FTLpid . " '+%a %d %b %Y %R %Z'"); ?> @@ -253,7 +254,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "dns", "piho - + From 9b1e2b8dab85c615a65576363447069980e2b498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 5 Feb 2022 19:21:25 +0100 Subject: [PATCH 2/4] Fix indention MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.php b/settings.php index 7152ffee..a5119480 100644 --- a/settings.php +++ b/settings.php @@ -240,7 +240,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "dns", "piho } $FTLversion = exec("/usr/bin/pihole-FTL version"); - $FTLstart = exec("date -r /proc/" . $FTLpid . " '+%a %d %b %Y %R %Z'"); + $FTLstart = exec("date -r /proc/" . $FTLpid . " '+%a %d %b %Y %R %Z'"); ?>
Time FTL started:
User / Group:
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 3/4] 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'"); +} + ?>