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

git-svn-id: https://develop.svn.wordpress.org/trunk@11288 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-12 00:32:36 +00:00
parent c98ba1c9d3
commit 5982580e70
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
}