WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/wp-admin/options.php

    r12411 r12508  
    6666        if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) )
    6767            $_POST['time_format'] = $_POST['time_format_custom'];
     68        // Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
     69        if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) {
     70            $_POST['gmt_offset'] = $_POST['timezone_string'];
     71            $_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']);
     72            $_POST['timezone_string'] = '';
     73        }
    6874    }
    6975
Note: See TracChangeset for help on using the changeset viewer.