Do not depend on the server timezone for providing the default timezone value.

This commit is contained in:
Alex Tselegidis 2020-03-29 14:03:50 +02:00
parent db5c2968c6
commit b8ebe2b1bd

View file

@ -17,6 +17,11 @@
* @package Models
*/
class Timezones_Model extends CI_Model {
/**
* @var string
*/
protected $default = 'UTC';
/**
* @var array
*/
@ -578,10 +583,6 @@ class Timezones_Model extends CI_Model {
*/
public function get_default_timezone()
{
$server_timezone = date_default_timezone_get();
$list = $this->to_array();
return isset($list[$server_timezone]) ? $server_timezone : 'UTC';
return 'UTC';
}
}