Use getter/setter for timezone value

This commit is contained in:
Michael 2021-07-24 21:16:53 +00:00
parent 40a42ccdb1
commit 866dbf9f89
4 changed files with 32 additions and 11 deletions

View file

@ -62,7 +62,6 @@ class App
public $argv;
/** @deprecated 2019.09 - use App\Arguments->getArgc() */
public $argc;
public $timezone;
public $theme_info = [];
// Allow themes to control internal parameters
// by changing App values in theme.php
@ -72,6 +71,7 @@ class App
public $theme_events_in_profile = true;
public $queue;
private $timezone = '';
private $profile_owner = 0;
private $contact_id = 0;
@ -172,6 +172,27 @@ class App
return $this->contact_id;
}
/**
* Set the timezone
*
* @param int $timezone
* @return void
*/
public function setTimeZone(string $timezone)
{
$this->timezone = $timezone;
}
/**
* Get the timezone
*
* @return int
*/
public function getTimeZone():string
{
return $this->timezone;
}
/**
* Returns the current config cache of this node
*