Fix sign of GMT offsets. Props Denis-de-Bernardy. fixes #9758

git-svn-id: http://svn.automattic.com/wordpress/trunk@11288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-12 00:32:36 +00:00
parent 489da6fa67
commit c5e2d3dc99
1 changed files with 14 additions and 2 deletions

View File

@ -3114,7 +3114,16 @@ function wp_timezone_choice($selectedzone) {
$i++;
}
asort($zonen);
usort($zonen, create_function(
'$a, $b', '
if ( $a["continent"] == $b["continent"] && $a["city"] == $b["city"] )
return strnatcasecmp($a["subcity"], $b["subcity"]);
elseif ( $a["continent"] == $b["continent"] )
return strnatcasecmp($a["city"], $b["city"]);
else
return strnatcasecmp($a["continent"], $b["continent"]);
'));
$structure = '';
$pad = '   ';
@ -3138,7 +3147,10 @@ function wp_timezone_choice($selectedzone) {
if ( !empty($subcity) ) {
$city = $city . '/'. $subcity;
}
$structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".str_replace('_',' ',$city)."</option>\n"; //Timezone
$display = str_replace('_',' ',$city);
if ( $continent == 'Etc' )
$display = strtr($display, '+-', '-+');
$structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".$display."</option>\n"; //Timezone
} else {
$structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">".$continent."</option>\n"; //Timezone
}