]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/options-general.php
Wordpress 2.8.2
[autoinstalls/wordpress.git] / wp-admin / options-general.php
index cd4b8cdb3ad5731fb0900a0124f9d4f5804b3ee5..3f2588856b9a79857db800a520519b9be02dde3f 100644 (file)
@@ -157,7 +157,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
 <span class="description"><?php _e('Choose a city in the same timezone as you.'); ?></span>
 <br />
 <span>
-<?php if (get_option('timezone_string')) : ?>
+<?php if ($tzstring) : ?>
        <?php
        $now = localtime(time(),true);
        if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');
@@ -165,11 +165,11 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
        ?>
        <br />
        <?php
-       if (function_exists('timezone_transitions_get') && $tzstring) {
+       if (function_exists('timezone_transitions_get')) {
                $dateTimeZoneSelected = new DateTimeZone($tzstring);
                foreach (timezone_transitions_get($dateTimeZoneSelected) as $tr) {
                        if ($tr['ts'] > time()) {
-                               $found = true;
+                           $found = true;
                                break;
                        }
                }
@@ -179,10 +179,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
                        $message = $tr['isdst'] ?
                                __('Daylight savings time begins on: <code>%s</code>.') :
                                __('Standard time begins  on: <code>%s</code>.');
-                       $tz = new DateTimeZone($tzstring);
-                       $d = new DateTime( "@{$tr['ts']}" );
-                       $d->setTimezone($tz);
-                       printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $d->format('U') ) );
+                       printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) );
                } else {
                        _e('This timezone does not observe daylight savings time.');
                }