mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-01 20:33:22 +03:00
Do not depend on the server timezone for providing the default timezone value.
This commit is contained in:
parent
db5c2968c6
commit
b8ebe2b1bd
1 changed files with 6 additions and 5 deletions
|
@ -17,6 +17,11 @@
|
||||||
* @package Models
|
* @package Models
|
||||||
*/
|
*/
|
||||||
class Timezones_Model extends CI_Model {
|
class Timezones_Model extends CI_Model {
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $default = 'UTC';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
|
@ -578,10 +583,6 @@ class Timezones_Model extends CI_Model {
|
||||||
*/
|
*/
|
||||||
public function get_default_timezone()
|
public function get_default_timezone()
|
||||||
{
|
{
|
||||||
$server_timezone = date_default_timezone_get();
|
return 'UTC';
|
||||||
|
|
||||||
$list = $this->to_array();
|
|
||||||
|
|
||||||
return isset($list[$server_timezone]) ? $server_timezone : 'UTC';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue