From b8ebe2b1bd4a14d97a0bf33cf8cde94f0f527e2c Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 29 Mar 2020 14:03:50 +0200 Subject: [PATCH] Do not depend on the server timezone for providing the default timezone value. --- application/models/Timezones_model.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/models/Timezones_model.php b/application/models/Timezones_model.php index 5439603a..b19b8906 100644 --- a/application/models/Timezones_model.php +++ b/application/models/Timezones_model.php @@ -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'; } }