Changeset 45556
- Timestamp:
- 06/20/2019 02:10:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-general.php
r45403 r45556 253 253 <span> 254 254 <?php 255 // Set TZ so localtime works.256 date_default_timezone_set( $tzstring);257 $now = localtime( time(), true ); 258 if ( $ now['tm_isdst']) {255 $now = new DateTime( 'now', new DateTimeZone( $tzstring ) ); 256 $dst = (bool) $now->format( 'I' ); 257 258 if ( $dst ) { 259 259 _e( 'This timezone is currently in daylight saving time.' ); 260 260 } else { … … 297 297 } 298 298 } 299 // Set back to UTC.300 date_default_timezone_set( 'UTC' );301 299 ?> 302 300 </span>
Note: See TracChangeset
for help on using the changeset viewer.