<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[54515] branches/5.7/tests/phpunit/tests: Tests: Replace the timezone used in date/time tests.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/54515">54515</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/54515","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>peterwilsoncc</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2022-10-14 06:57:57 +0000 (Fri, 14 Oct 2022)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Replace the timezone used in date/time tests.
The `Europe/Kiev` timezone has been deprecated in PHP 8.2 and replaced with `Europe/Kyiv`.
The tests updated in this commit are testing the WordPress date/time functionality. They are **not** testing whether WP or PHP can handle deprecated timezone names correctly.
To ensure the tests follow the original purpose, the use of `Europe/Kiev` within these tests is now replaced with the `Europe/Helsinki` timezone, which is within the same timezone as `Europe/Kyiv`. This should ensure that these tests run without issue and test what they are supposed to be testing on every supported PHP version (unless at some point in the future `Europe/Helsinki` would be renamed, but that's a bridge to cross if and when).
Note: Separate tests should/will be added to ensure that relevant date/time related functions handle a deprecated timezone correctly, but that is not something ''these'' tests are supposed to be testing.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/45853">[45853]</a>, <a href="https://core.trac.wordpress.org/changeset/45856">[45856]</a>, <a href="https://core.trac.wordpress.org/changeset/45876">[45876]</a>, <a href="https://core.trac.wordpress.org/changeset/45882">[45882]</a>, <a href="https://core.trac.wordpress.org/changeset/45887">[45887]</a>, <a href="https://core.trac.wordpress.org/changeset/45908">[45908]</a>, <a href="https://core.trac.wordpress.org/changeset/45914">[45914]</a>, <a href="https://core.trac.wordpress.org/changeset/46577">[46577]</a>, <a href="https://core.trac.wordpress.org/changeset/46154">[46154]</a>, <a href="https://core.trac.wordpress.org/changeset/46580">[46580]</a>, <a href="https://core.trac.wordpress.org/changeset/46864">[46864]</a>, <a href="https://core.trac.wordpress.org/changeset/46974">[46974]</a>, <a href="https://core.trac.wordpress.org/changeset/54207">[54207]</a>.
Props jrf, costdev, SergeyBiryukov.
Merges <a href="https://core.trac.wordpress.org/changeset/54217">[54217]</a> to the 5.7 branch.
See <a href="https://core.trac.wordpress.org/ticket/56468">#56468</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches57testsphpunittestsdatecurrentTimephp">branches/5.7/tests/phpunit/tests/date/currentTime.php</a></li>
<li><a href="#branches57testsphpunittestsdatedateI18nphp">branches/5.7/tests/phpunit/tests/date/dateI18n.php</a></li>
<li><a href="#branches57testsphpunittestsdategetFeedBuildDatephp">branches/5.7/tests/phpunit/tests/date/getFeedBuildDate.php</a></li>
<li><a href="#branches57testsphpunittestsdategetPostTimephp">branches/5.7/tests/phpunit/tests/date/getPostTime.php</a></li>
<li><a href="#branches57testsphpunittestsdatemysql2datephp">branches/5.7/tests/phpunit/tests/date/mysql2date.php</a></li>
<li><a href="#branches57testsphpunittestsdatequeryphp">branches/5.7/tests/phpunit/tests/date/query.php</a></li>
<li><a href="#branches57testsphpunittestsdatewpTimezonephp">branches/5.7/tests/phpunit/tests/date/wpTimezone.php</a></li>
<li><a href="#branches57testsphpunittestsdatexmlrpcphp">branches/5.7/tests/phpunit/tests/date/xmlrpc.php</a></li>
<li><a href="#branches57testsphpunittestsformattingdatephp">branches/5.7/tests/phpunit/tests/formatting/date.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches57">branches/5.7/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.7
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/5.7 2022-10-14 06:56:01 UTC (rev 54514)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.7 2022-10-14 06:57:57 UTC (rev 54515)
</ins><a id="branches57"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.7</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/5.0:43681-43682,43684-43688,43719-43720,43723,43726-43727,43729-43731,43734-43744,43747,43751-43754,43758,43760-43765,43767-43770,43772,43774-43781,43783,43785,43790-43806,43808-43821,43825,43828,43830-43834,43836-43843,43846-43863,43867-43889,43891-43894,43897-43905,43908-43909,43911-43929,43931-43942,43946-43947,43949-43956,43959-43964,43967-43969,43988,43994,44014,44017,44047,44183,44185,44187-44206,44208-44213,44231-44232,44235,44248,44284,44287-44288
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.5:49373-49379,49381
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.8:51889
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:50428-50430,50432,50435-50436,50439,50441-50446,50460-50461,50465-50466,50471,50473,50475,50478-50479,50483,50485-50487,50493,50495,50499,50501,50507,50510,50518,50523,50525,50534-50535,50545,50551-50552,50566-50569,50571,50575,50577,50579,50585-50586,50590-50598,50628,50634,50653-50654,50659,50663,50667,50669-50670,50682-50683,50687,50704,50708,50710,50714,50717,50796,50799,50930,50938,50940-50941,50954,51002,51035,51169,51341,51355,51426,51498,51511,51535,51559-51560,51740,51810-51813,51828,51883,51890,51921,51924-51925,51937,52002,52130,52183,52233,52412,52454-52457,52844,53112,53581-53582,53592,53958-53960,54322
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:50428-50430,50432,50435-50436,50439,50441-50446,50460-50461,50465-50466,50471,50473,50475,50478-50479,50483,50485-50487,50493,50495,50499,50501,50507,50510,50518,50523,50525,50534-50535,50545,50551-50552,50566-50569,50571,50575,50577,50579,50585-50586,50590-50598,50628,50634,50653-50654,50659,50663,50667,50669-50670,50682-50683,50687,50704,50708,50710,50714,50717,50796,50799,50930,50938,50940-50941,50954,51002,51035,51169,51341,51355,51426,51498,51511,51535,51559-51560,51740,51810-51813,51828,51883,51890,51921,51924-51925,51937,52002,52130,52183,52233,52412,52454-52457,52844,53112,53581-53582,53592,53958-53960,54217,54322
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches57testsphpunittestsdatecurrentTimephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/currentTime.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/currentTime.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/currentTime.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,7 +81,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 40653
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_wp_timestamp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = time();
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTime( '@' . $timestamp );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,7 +106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 40653
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_correct_local_time() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = time();
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime_local = new DateTime( '@' . $timestamp );
</span></span></pre></div>
<a id="branches57testsphpunittestsdatedateI18nphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/dateI18n.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/dateI18n.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/dateI18n.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,7 +11,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28636
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_current_time_on_invalid_timestamp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +24,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28636
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_handle_zero_timestamp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = DateTimeImmutable::createFromFormat(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,7 +143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 25768
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_wp_timestamp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', wp_timezone() );
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = $datetime->getTimestamp();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,10 +193,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function dst_times() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Kiev' ),
- 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Kiev' ),
- 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Kiev' ),
- 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Kiev' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Helsinki' ),
+ 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Helsinki' ),
+ 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Helsinki' ),
+ 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Helsinki' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches57testsphpunittestsdategetFeedBuildDatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/getFeedBuildDate.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/getFeedBuildDate.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/getFeedBuildDate.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_fall_back_to_last_post_modified() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_query;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', wp_timezone() );
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime_utc = $datetime->setTimezone( new DateTimeZone( 'UTC' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches57testsphpunittestsdategetPostTimephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/getPostTime.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/getPostTime.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/getPostTime.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 25002
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_wp_timestamp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 25002
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_time() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +121,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $rfc3339, get_post_modified_time( DATE_RFC3339, true, $post_id ) );
</span></span></pre></div>
<a id="branches57testsphpunittestsdatemysql2datephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/mysql2date.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/mysql2date.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/mysql2date.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28992
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_mysql2date_should_format_time() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $rfc3339 = $datetime->format( DATE_RFC3339 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28992
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_mysql2date_should_format_time_with_changed_time_zone() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
</span><span class="cx" style="display: block; padding: 0 10px"> date_default_timezone_set( $timezone );
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,8 +62,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28992
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_mysql2date_should_return_wp_timestamp() {
- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_mysql2date_should_return_wp_timestamp() {
+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_timestamp = $datetime->getTimestamp() + $datetime->getOffset();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,8 +76,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 28992
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_mysql2date_should_return_unix_timestamp_for_gmt_time() {
- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() {
+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = $datetime->getTimestamp();
</span></span></pre></div>
<a id="branches57testsphpunittestsdatequeryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/query.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/query.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -561,7 +561,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $default_to_max Flag to default missing values to max.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_build_mysql_datetime_with_custom_timezone( $datetime, $expected, $default_to_max = false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $q = new WP_Date_Query( array() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -583,7 +583,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41782
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_build_mysql_datetime_with_relative_date() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $q = new WP_Date_Query( array() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches57testsphpunittestsdatewpTimezonephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/wpTimezone.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/wpTimezone.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/wpTimezone.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,13 +31,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 24730
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_should_return_timezone_string() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'timezone_string', 'Europe/Kiev' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'timezone_string', 'Europe/Helsinki' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Europe/Kiev', wp_timezone_string() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Europe/Helsinki', wp_timezone_string() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $timezone = wp_timezone();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Europe/Kiev', $timezone->getName() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Europe/Helsinki', $timezone->getName() );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="branches57testsphpunittestsdatexmlrpcphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/date/xmlrpc.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/date/xmlrpc.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/date/xmlrpc.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,7 +14,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers wp_xmlrpc_server::mw_newPost
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_date_new_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers wp_xmlrpc_server::mw_editPost
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_date_edit_post() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,8 +202,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers wp_xmlrpc_server::wp_editComment
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_date_edit_comment() {
- $timezone = 'Europe/Kiev';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_date_edit_comment() {
+ $timezone = 'Europe/Helsinki';
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) );
</span></span></pre></div>
<a id="branches57testsphpunittestsformattingdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/tests/phpunit/tests/formatting/date.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/tests/phpunit/tests/formatting/date.php 2022-10-14 06:56:01 UTC (rev 54514)
+++ branches/5.7/tests/phpunit/tests/formatting/date.php 2022-10-14 06:57:57 UTC (rev 54515)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -197,7 +197,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function timezone_provider() {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'timezone_string' => 'Europe/Kiev',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'timezone_string' => 'Europe/Helsinki',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'gmt_offset' => 3,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span></span></pre>
</div>
</div>
</body>
</html>