diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php
index def2124985..c6e4734770 100644
--- a/wp-admin/options-general.php
+++ b/wp-admin/options-general.php
@@ -139,11 +139,23 @@ foreach ( $offset_range as $offset ) {
else: // looks like we can do nice timezone selection!
$current_offset = get_option('gmt_offset');
$tzstring = get_option('timezone_string');
-if (empty($tzstring)) { // set the Etc zone if no timezone string exists
- if ($current_offset < 0) $offnum = - ceil($current_offset);
- else $offnum = - floor($current_offset);
- $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
+
+$check_zone_info = true;
+
+// Remove old Etc mappings. Fallback to gmt_offset.
+if ( false !== strpos($tzstring,'Etc/GMT') )
+ $tzstring = '';
+
+if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists
+ $check_zone_info = false;
+ if ( 0 == $current_offset )
+ $tzstring = 'UTC+0';
+ elseif ($current_offset < 0)
+ $tzstring = 'UTC' . $current_offset;
+ else
+ $tzstring = 'UTC+' . $current_offset;
}
+
?>
|
@@ -160,7 +172,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
-
+
';
}
// Add the city to the value
$value[] = $zone['city'];
- if ( 'Etc' === $zone['continent'] ) {
- if ( 'UTC' === $zone['city'] ) {
- $display = '';
- } else {
- $display = str_replace( 'GMT', '', $zone['city'] );
- $display = strtr( $display, '+-', '-+' ) . ':00';
- }
- $display = sprintf( __( 'UTC %s' ), $display );
- } else {
- $display = $zone['t_city'];
- if ( !empty( $zone['subcity'] ) ) {
- // Add the subcity to the value
- $value[] = $zone['subcity'];
- $display .= ' - ' . $zone['t_subcity'];
- }
+
+ $display = $zone['t_city'];
+ if ( !empty( $zone['subcity'] ) ) {
+ // Add the subcity to the value
+ $value[] = $zone['subcity'];
+ $display .= ' - ' . $zone['t_subcity'];
}
}
@@ -3490,6 +3478,36 @@ function wp_timezone_choice( $selected_zone ) {
}
}
+ // Do UTC
+ $structure[] = '';
+
+ // Do manual UTC offsets
+ $structure[] = '';
+
return join( "\n", $structure );
}
|