From c5e2d3dc99928c07ba1deb0ea2338109e015448a Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 12 May 2009 00:32:36 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f2f5de81be..aab4747222 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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\n"; //Timezone + $display = str_replace('_',' ',$city); + if ( $continent == 'Etc' ) + $display = strtr($display, '+-', '-+'); + $structure .= "\t\n"; //Timezone } else { $structure .= "\n"; //Timezone }