/** * (non-PHPDoc) * @see ApplicationBootstrap::detectTimezone() For the method documentation. */ protected function detectTimezone() { $auth = Auth::getInstance(); if (!$auth->isAuthenticated() || ($timezone = $auth->getUser()->getPreferences()->getValue('icingaweb', 'timezone')) === null) { $detect = new TimezoneDetect(); $timezone = $detect->getTimezoneName(); } return $timezone; }
/** * Return the current default timezone * * @return string */ protected function getDefaultTimezone() { $detect = new TimezoneDetect(); if ($detect->success()) { return $detect->getTimezoneName(); } else { return @date_default_timezone_get(); } }