CC-3955: System -> Preferences: Timezone setting is the first one in the list,

not the current (local) timezone.

- fixed
This commit is contained in:
James 2012-06-20 18:24:28 -04:00
parent c669d3cb47
commit b081a9eb5f
1 changed files with 3 additions and 2 deletions

View File

@ -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) {