From 1483fb92e5b41e677f029f5410244df4a36fd13c Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 17 Sep 2012 15:55:46 -0400 Subject: [PATCH] better detection of timezone during install (suppress PHP warnings if timezone is not set in php.ini) --- install_minimal/include/AirtimeInstall.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index d0c2ed3f7..cb054b429 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -320,7 +320,8 @@ class AirtimeInstall { $con = Propel::getConnection(); // we need to run php as commandline because we want to get the timezone in cli php.ini file - $defaultTimezone = exec("php -r 'echo date_default_timezone_get().PHP_EOL;'"); + //$defaultTimezone = exec("php -r 'echo date_default_timezone_get().PHP_EOL;'"); + $defaultTimezone = exec("cat /etc/timezone"); $defaultTimezone = trim($defaultTimezone); if((!in_array($defaultTimezone, DateTimeZone::listIdentifiers()))){ $defaultTimezone = "UTC";