Do not use deprecated Etc timezones. Props miqrogroove. fixes #11558 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@12507 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-12-23 14:16:36 +00:00
parent 159726cd94
commit 65658aacbf
3 changed files with 61 additions and 25 deletions

View File

@@ -65,6 +65,12 @@ case 'update':
$_POST['date_format'] = $_POST['date_format_custom'];
if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) )
$_POST['time_format'] = $_POST['time_format_custom'];
// Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) {
$_POST['gmt_offset'] = $_POST['timezone_string'];
$_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']);
$_POST['timezone_string'] = '';
}
}
if ( $options ) {