From 936558949d42f9f9f08949d5b301c139479273cf Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 24 Apr 2016 19:46:09 +0200 Subject: [PATCH] baculum: Fix setting invalid timezone value for PHP --- gui/baculum/README | 7 +++++++ gui/baculum/protected/Init.php | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gui/baculum/README b/gui/baculum/README index f069c575d8..823f595829 100644 --- a/gui/baculum/README +++ b/gui/baculum/README @@ -192,3 +192,10 @@ alghoritm used by "htpasswd" program. Plain text passwords for HTTP Basic auth are not longer supported by Baculum. From this reason good to check if used web server for Baculum is set to using MD5 type passwords in HTTP Basic authentication. + +c) Why time fields values contain invalid date/time values? + This case can mean that timezone is not set for PHP in php.ini file or the +timezone value needs correction. To fix it please add (or update) "date.timezone" +value in php.ini file. For example: + +date.timezone = "Europe/Warsaw" diff --git a/gui/baculum/protected/Init.php b/gui/baculum/protected/Init.php index 5c59817720..5b1a7b3332 100644 --- a/gui/baculum/protected/Init.php +++ b/gui/baculum/protected/Init.php @@ -22,12 +22,6 @@ $timezone = 'UTC'; if (!ini_get('date.timezone')) { - if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { - exec('date +%Z', $tz, $retcode); - if ($retcode === 0 && count($tz) === 1) { - $timezone = $tz[0]; - } - } date_default_timezone_set($timezone); } -- 2.39.5