Changeset 13606
- Timestamp:
- 03/06/2010 09:49:11 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options-general.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r13605 r13606 164 164 $tzstring = ''; 165 165 166 if ( empty($tzstring)) { // Create a UTC+- zone if no timezone string exists166 if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists 167 167 $check_zone_info = false; 168 168 if ( 0 == $current_offset ) … … 183 183 184 184 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n($timezone_format, false, 'gmt')); ?></span> 185 <?php if ( get_option('timezone_string')) : ?>185 <?php if ( get_option('timezone_string') ) : ?> 186 186 <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span> 187 187 <?php endif; ?> … … 192 192 <span> 193 193 <?php 194 $now = localtime(time(),true); 195 if ($now['tm_isdst']) _e('This timezone is currently in daylight saving time.'); 196 else _e('This timezone is currently in standard time.'); 194 $now = localtime(time(), true); 195 if ( $now['tm_isdst'] ) 196 _e('This timezone is currently in daylight saving time.'); 197 else 198 _e('This timezone is currently in standard time.'); 197 199 ?> 198 200 <br /> 199 201 <?php 200 if (function_exists('timezone_transitions_get')) { 201 $dateTimeZoneSelected = new DateTimeZone($tzstring); 202 foreach (timezone_transitions_get($dateTimeZoneSelected) as $tr) { 203 if ($tr['ts'] > time()) { 202 if ( function_exists('timezone_transitions_get') ) { 203 $found = false; 204 $date_time_zone_selected = new DateTimeZone($tzstring); 205 foreach ( timezone_transitions_get($date_time_zone_selected) as $tr) { 206 if ( $tr['ts'] > time() ) { 204 207 $found = true; 205 208 break; … … 207 210 } 208 211 209 if ( isset($found) && $found === true) {212 if ( $found ) { 210 213 echo ' '; 211 214 $message = $tr['isdst'] ? 212 215 __('Daylight saving time begins on: <code>%s</code>.') : 213 216 __('Standard time begins on: <code>%s</code>.'); 214 printf( $message, date_i18n(get_option('date_format') .' '.get_option('time_format'), $tr['ts'] ) );217 printf( $message, date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $tr['ts'] ) ); 215 218 } else { 216 219 _e('This timezone does not observe daylight saving time.'); … … 237 240 ) ); 238 241 239 $custom = TRUE;242 $custom = true; 240 243 241 244 foreach ( $date_formats as $format ) { … … 243 246 if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "===" 244 247 echo " checked='checked'"; 245 $custom = FALSE;248 $custom = false; 246 249 } 247 250 echo ' /> ' . date_i18n( $format ) . "</label><br />\n"; … … 269 272 ) ); 270 273 271 $custom = TRUE;274 $custom = true; 272 275 273 276 foreach ( $time_formats as $format ) { … … 275 278 if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "===" 276 279 echo " checked='checked'"; 277 $custom = FALSE;280 $custom = false; 278 281 } 279 282 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";
Note: See TracChangeset
for help on using the changeset viewer.