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:
parent
13285fdd63
commit
84ec62eeca
9 changed files with 144 additions and 21 deletions
|
@ -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;
|
||||
|
|
|
@ -50,6 +50,7 @@ AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
|||
// set up some keys in DB
|
||||
AirtimeInstall::SetUniqueId();
|
||||
AirtimeInstall::SetImportTimestamp();
|
||||
AirtimeInstall::SetDefaultTimezone();
|
||||
|
||||
if (AirtimeInstall::$databaseTablesCreated) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue