better detection of timezone during install
(suppress PHP warnings if timezone is not set in php.ini)
This commit is contained in:
parent
54bb414500
commit
1483fb92e5
|
@ -320,7 +320,8 @@ class AirtimeInstall
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
// we need to run php as commandline because we want to get the timezone in cli php.ini file
|
// 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);
|
$defaultTimezone = trim($defaultTimezone);
|
||||||
if((!in_array($defaultTimezone, DateTimeZone::listIdentifiers()))){
|
if((!in_array($defaultTimezone, DateTimeZone::listIdentifiers()))){
|
||||||
$defaultTimezone = "UTC";
|
$defaultTimezone = "UTC";
|
||||||
|
|
Loading…
Reference in New Issue