From fe1fc5900def58f91052aac5c3d20c95fd07707c Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 19 Mar 2014 17:17:20 -0500 Subject: [PATCH] Implement client timezone preference --- include/class.auth.php | 2 -- include/class.client.php | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/class.auth.php b/include/class.auth.php index 9e981d011..c7b80da05 100644 --- a/include/class.auth.php +++ b/include/class.auth.php @@ -419,8 +419,6 @@ abstract class UserAuthenticationBackend extends AuthenticationBackend { $authsession = array(); //clear. $authsession['id'] = $user->getId(); $authsession['key'] = $authkey; - $_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset(); - $_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving(); //The backend used decides the format of the auth key. // XXX: encrypt to hide the bk?? diff --git a/include/class.client.php b/include/class.client.php index 2fd702d56..309cb78d2 100644 --- a/include/class.client.php +++ b/include/class.client.php @@ -277,8 +277,11 @@ class ClientAccount extends ClientAccountModel { const PASSWD_RESET_REQUIRED = 0x0002; function __onload() { - if ($this->get('timezone_id')) + if ($this->get('timezone_id')) { $this->timezone = Timezone::getOffsetById($this->ht['timezone_id']); + $_SESSION['TZ_OFFSET'] = $this->timezone; + $_SESSION['TZ_DST'] = $this->get('dst'); + } } function checkPassword($password, $autoupdate=true) { -- GitLab