Ticket #3962: timezone-etc.diff
File timezone-etc.diff, 2.2 KB (added by , 16 years ago) |
---|
-
wp-admin/options-general.php
133 133 <?php 134 134 else: // looks like we can do nice timezone selection! 135 135 $current_offset = get_option('gmt_offset'); 136 $tzstring = get_option('timezone_string'); 137 if (empty($tzstring)) { // set the Etc zone if no timezone string exists 138 if ($current_offset < 0) $offnum = ceil($current_offset); 139 else $offnum = floor($current_offset); 140 $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum; 141 } 136 142 ?> 137 143 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th> 138 144 <td> 139 145 140 146 <select id="timezone_string" name="timezone_string"> 141 <?php echo wp_timezone_choice( get_option('timezone_string')); ?>147 <?php echo wp_timezone_choice($tzstring); ?> 142 148 </select> 143 149 144 150 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span> -
wp-includes/functions.php
3104 3104 $zonen[$i]['subcity'] = isset($zone[2]) ? $zone[2] : ''; 3105 3105 $i++; 3106 3106 } 3107 3107 3108 3108 asort($zonen); 3109 3109 $structure = ''; 3110 3110 $pad = ' '; … … 3133 3133 if ( !empty($subcity) ) { 3134 3134 $city = $city . '/'. $subcity; 3135 3135 } 3136 $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected 3136 $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".str_replace('_',' ',$city)."</option>\n"; //Timezone 3137 3137 } else { 3138 $structure .= "<option ".(($continent==$selectedzone)?'selected="selected 3138 $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">".$continent."</option>\n"; //Timezone 3139 3139 } 3140 3140 } 3141 3141