Changeset 12508 for branches/2.9/wp-admin/options-general.php
- Timestamp:
- 12/23/2009 02:17:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.9/wp-admin/options-general.php
r11761 r12508 140 140 $current_offset = get_option('gmt_offset'); 141 141 $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 142 149 if (empty($tzstring)) { // set the Etc zone if no timezone string exists 143 if ($current_offset < 0) $offnum = - ceil($current_offset); 144 else $offnum = - floor($current_offset); 145 $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum; 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; 146 157 } 158 147 159 ?> 148 160 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th> … … 161 173 <br /> 162 174 <span> 163 <?php if ($ tzstring) : ?>175 <?php if ($check_zone_info && $tzstring) : ?> 164 176 <?php 165 177 $now = localtime(time(),true);
Note: See TracChangeset
for help on using the changeset viewer.