From f5c4065b89b5219202bd6d2db2d488710399dff9 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 6 Feb 2017 15:59:20 +0100 Subject: [PATCH] Check if time zone is set the mute some PHP warnings --- scripts/pi-hole/php/data.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/pi-hole/php/data.php b/scripts/pi-hole/php/data.php index 3b1a8230..92eee58e 100644 --- a/scripts/pi-hole/php/data.php +++ b/scripts/pi-hole/php/data.php @@ -29,6 +29,12 @@ $privacyMode = false; } + // Check if time zone is set + // https://github.com/pi-hole/AdminLTE/pull/394 + if (!date_default_timezone_get("date.timezone")) { + date_default_timezone_set("UTC"); + } + /******* Public Members ********/ function getSummaryData() { $domains_being_blocked = gravityCount();