diff --git a/install_minimal/upgrades/airtime-2.0.1/UpgradeCommon.php b/install_minimal/upgrades/airtime-2.0.1/UpgradeCommon.php index 38bbb31f6..63f797938 100644 --- a/install_minimal/upgrades/airtime-2.0.1/UpgradeCommon.php +++ b/install_minimal/upgrades/airtime-2.0.1/UpgradeCommon.php @@ -22,7 +22,9 @@ class UpgradeCommon{ { $sql = "SELECT valstr from cc_pref WHERE keystr = 'timezone'"; - $timezone = self::queryDb($sql); + $result = self::queryDb($sql); + $timezone = $result['valstr']; + date_default_timezone_set($timezone); } @@ -245,7 +247,7 @@ class UpgradeCommon{ public static function queryDb($p_sql){ global $CC_DBC; - $result = $CC_DBC->query($p_sql); + $result = $CC_DBC->getRow($p_sql, $fetchmode=DB_FETCHMODE_ASSOC); if (PEAR::isError($result)) { echo "Error executing $sql. Exiting."; exit(1);