$userinfo['tzoffset'] = $userinfo['timezoneoffset']; if ($userinfo['dstonoff']) { // DST is on, add an hour $userinfo['tzoffset']++; }