From 48d3c68290b96c7d2a0e875ec3338f067a529b22 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 16 Jul 2012 18:44:13 +0200 Subject: [PATCH] [feature/new-tz-handling] Use tmp variable for user timezone PHPBB3-9558 --- phpBB/includes/user.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index cc50d2b98e..7dfb375a9b 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -82,13 +82,13 @@ class phpbb_user extends phpbb_session $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']); $this->date_format = $this->data['user_dateformat']; - $this->tz = $this->data['user_timezone']; + $user_timezone = $this->data['user_timezone']; } else { $this->lang_name = basename($config['default_lang']); $this->date_format = $config['default_dateformat']; - $this->tz = $config['board_timezone']; + $user_timezone = $config['board_timezone']; /** * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language @@ -127,13 +127,13 @@ class phpbb_user extends phpbb_session */ } - if (is_numeric($this->tz)) + if (is_numeric($user_timezone)) { // Might still be numeric - $this->tz = sprintf('Etc/GMT%+d', $this->tz); + $user_timezone = sprintf('Etc/GMT%+d', $user_timezone); } - $this->tz = new DateTimeZone($this->tz); + $this->tz = new DateTimeZone($user_timezone); // We include common language file here to not load it every time a custom language file is included $lang = &$this->lang;