X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/3f5685912e89eb3b0534acd85aa0946b1ca2bbe3..16b9f61a8ab25bd6c9fbfd0cea00c7bda22f6a71:/wp-admin/options.php diff --git a/wp-admin/options.php b/wp-admin/options.php index a1bb4a0f..11d6ee05 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -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 ) {