Ticket #9588: 9588.6.diff

File 9588.6.diff, 865 bytes (added by Denis-de-Bernardy, 4 years ago)
Line 
1Index: wp-admin/options-general.php
2===================================================================
3--- wp-admin/options-general.php        (revision 11001)
4+++ wp-admin/options-general.php        (working copy)
5@@ -159,7 +159,7 @@
6 <span>
7 <?php if (get_option('timezone_string')) : ?>
8        <?php
9-       $now = localtime(time(),true);
10+       $now = localtime(strtotime(gmdate("Y-m-d H:i:s")),true);
11        if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');
12        else _e('This timezone is currently in standard time.');
13        ?>
14@@ -168,7 +168,7 @@
15        if (function_exists('timezone_transitions_get') && $tzstring) {
16                $dateTimeZoneSelected = new DateTimeZone($tzstring);
17                foreach (timezone_transitions_get($dateTimeZoneSelected) as $tr) {
18-                       if ($tr['ts'] > time()) {
19+                       if ($tr['ts'] > strtotime(gmdate("Y-m-d H:i:s"))) {
20                                $found = true;
21                                break;
22                        }