Make WordPress Core


Ignore:
Timestamp:
12/23/2009 02:16:36 PM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options.php

    r12411 r12507  
    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.