From b081a9eb5fd099f42f1751d918ac85c73d976989 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 20 Jun 2012 18:24:28 -0400 Subject: [PATCH] CC-3955: System -> Preferences: Timezone setting is the first one in the list, not the current (local) timezone. - fixed --- install_minimal/include/AirtimeInstall.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index 304cd6b35..e656bf983 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -318,8 +318,9 @@ class AirtimeInstall public static function SetDefaultTimezone() { - $con = Propel::getConnection(); - $defaultTimezone = exec("cat /etc/timezone"); + $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;'"); $sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('timezone', '$defaultTimezone')"; $result = $con->exec($sql); if ($result < 1) {