Changes from branches/2.8/wp-admin/options-general.php at r11598 to trunk/wp-admin/options-general.php at r11380
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r11598 r11380 158 158 <br /> 159 159 <span> 160 <?php if ( $tzstring) : ?>160 <?php if (get_option('timezone_string')) : ?> 161 161 <?php 162 162 $now = localtime(time(),true); … … 166 166 <br /> 167 167 <?php 168 if (function_exists('timezone_transitions_get') ) {168 if (function_exists('timezone_transitions_get') && $tzstring) { 169 169 $dateTimeZoneSelected = new DateTimeZone($tzstring); 170 170 foreach (timezone_transitions_get($dateTimeZoneSelected) as $tr) { 171 171 if ($tr['ts'] > time()) { 172 $found = true;172 $found = true; 173 173 break; 174 174 } … … 180 180 __('Daylight savings time begins on: <code>%s</code>.') : 181 181 __('Standard time begins on: <code>%s</code>.'); 182 printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) ); 182 $tz = new DateTimeZone($tzstring); 183 $d = new DateTime( "@{$tr['ts']}" ); 184 $d->setTimezone($tz); 185 printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $d->format('U') ) ); 183 186 } else { 184 187 _e('This timezone does not observe daylight savings time.');
Note: See TracChangeset
for help on using the changeset viewer.