- Timestamp:
- Jan 26, 2019 9:50:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r657 r658 203 203 // Set timezone. 204 204 $tz = date_default_timezone_get(); 205 // Check that PHP is configured with a valid timezone name, e.g., "UTC" or "America/Chicago". 206 if ($app->getParam('timezone') && $app->getParam('timezone') == $tz && preg_match('!^([A-Z_/-]{3,}|[-\d:]+)$!/i' '/[A-Z_\+-]{3,}|[-\d:]+/i', $tz)) { 205 // Check that PHP is configured with a valid timezone name, e.g., "UTC" or "America/Mexico_City" or "-6:00". 206 if ($app->getParam('timezone') && $app->getParam('timezone') == $tz && preg_match('!^([A-Z_/-]{3,}|[-+\d:]+)$!/i', $tz)) { 207 // https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html 207 208 $this->query(sprintf("SET SESSION time_zone = '%s'", $tz)); 208 209 }
Note: See TracChangeset
for help on using the changeset viewer.