From ea2b254de005f1bdbf1399bc127e1355133ddd13 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 6 Mar 2010 09:49:11 +0000 Subject: [PATCH] Code standards cleanup for wp-admin/options-general.php git-svn-id: https://develop.svn.wordpress.org/trunk@13606 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/options-general.php | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index b08111c860..8bb9dec5d5 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -163,7 +163,7 @@ $check_zone_info = true; if ( false !== strpos($tzstring,'Etc/GMT') ) $tzstring = ''; -if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists +if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists $check_zone_info = false; if ( 0 == $current_offset ) $tzstring = 'UTC+0'; @@ -182,7 +182,7 @@ if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists UTC time is %s'), date_i18n($timezone_format, false, 'gmt')); ?> - + %1$s'), date_i18n($timezone_format)); ?>
@@ -191,27 +191,30 @@ if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists

time()) { + if ( function_exists('timezone_transitions_get') ) { + $found = false; + $date_time_zone_selected = new DateTimeZone($tzstring); + foreach ( timezone_transitions_get($date_time_zone_selected) as $tr) { + if ( $tr['ts'] > time() ) { $found = true; break; } } - if ( isset($found) && $found === true ) { + if ( $found ) { echo ' '; $message = $tr['isdst'] ? __('Daylight saving time begins on: %s.') : __('Standard time begins on: %s.'); - printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) ); + printf( $message, date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $tr['ts'] ) ); } else { _e('This timezone does not observe daylight saving time.'); } @@ -236,13 +239,13 @@ if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists 'd/m/Y', ) ); - $custom = TRUE; + $custom = true; foreach ( $date_formats as $format ) { echo "\t
\n"; } @@ -268,13 +271,13 @@ if (empty($tzstring)) { // Create a UTC+- zone if no timezone string exists 'H:i', ) ); - $custom = TRUE; + $custom = true; foreach ( $time_formats as $format ) { echo "\t
\n"; }