- Timestamp:
- Jan 25, 2019 11:29:23 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r654 r656 378 378 // tz cookie has a timezone offset, like "-6" (assume UTC). 379 379 $tz = timezone_name_from_abbr('', $_COOKIE['tz'] * 3600, 0); 380 if ($tz ) {380 if ($tz && preg_match('![A-Z]{3,}|\w+/\w+!', $tz)) { 381 381 // Valid. 382 382 $this->setParam(array('timezone' => $tz)); … … 395 395 // Failed: unset the timezone parameter so it isn't used to set the database timezone. 396 396 $this->setParam(array('timezone' => null)); 397 $this->logMsg(sprintf('Failed to use timezone: %s', $this->getParam('timezone')), LOG_NOTICE, __FILE__, __LINE__); 398 } 397 $this->logMsg(sprintf('Failed to set timezone: %s', $this->getParam('timezone')), LOG_NOTICE, __FILE__, __LINE__); 398 } 399 } else { 400 $this->logMsg(sprintf('Using server timezone: %s', date_default_timezone_get()), LOG_DEBUG, __FILE__, __LINE__); 399 401 } 400 402
Note: See TracChangeset
for help on using the changeset viewer.