CC-1942: Add ability to set timezone in preferences

-Can change the timezone for PHP. Need to change for python as well.
This commit is contained in:
martin 2011-08-12 14:14:07 -04:00
parent 13285fdd63
commit 84ec62eeca
9 changed files with 144 additions and 21 deletions

View file

@ -294,6 +294,18 @@ class AirtimeInstall
return true;
}
public static function SetDefaultTimezone()
{
global $CC_DBC;
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('timezone', 'America/Toronto')";
$result = $CC_DBC->query($sql);
if (PEAR::isError($result)) {
return false;
}
return true;
}
public static function SetImportTimestamp()
{
global $CC_DBC;

View file

@ -50,6 +50,7 @@ AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
// set up some keys in DB
AirtimeInstall::SetUniqueId();
AirtimeInstall::SetImportTimestamp();
AirtimeInstall::SetDefaultTimezone();
if (AirtimeInstall::$databaseTablesCreated) {