Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12508 r11761  
    140140$current_offset = get_option('gmt_offset');
    141141$tzstring = get_option('timezone_string');
    142 
    143 $check_zone_info = true;
    144 
    145 // Remove old Etc mappings.  Fallback to gmt_offset.
    146 if ( false !== strpos($tzstring,'Etc/GMT') )
    147         $tzstring = '';
    148 
    149142if (empty($tzstring)) { // set the Etc zone if no timezone string exists
    150         $check_zone_info = false;
    151         if ( 0 == $current_offset )
    152                 $tzstring = 'UTC+0';
    153         elseif ($current_offset < 0)
    154                 $tzstring = 'UTC' . $current_offset;
    155         else
    156                 $tzstring = 'UTC+' . $current_offset;
     143        if ($current_offset < 0) $offnum = - ceil($current_offset);
     144        else $offnum = - floor($current_offset);
     145        $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
    157146}
    158 
    159147?>
    160148<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
    … …  
    173161<br />
    174162<span>
    175 <?php if ($check_zone_info && $tzstring) : ?>
     163<?php if ($tzstring) : ?>
    176164        <?php
    177165        $now = localtime(time(),true);
Note: See TracChangeset for help on using the changeset viewer.