<!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>[54512] branches/6.0/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/54512">54512</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/54512","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 05:58:20 +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 6.0 branch.
See <a href="https://core.trac.wordpress.org/ticket/56468">#56468</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches60testsphpunittestsdatecurrentTimephp">branches/6.0/tests/phpunit/tests/date/currentTime.php</a></li>
<li><a href="#branches60testsphpunittestsdatedateI18nphp">branches/6.0/tests/phpunit/tests/date/dateI18n.php</a></li>
<li><a href="#branches60testsphpunittestsdategetFeedBuildDatephp">branches/6.0/tests/phpunit/tests/date/getFeedBuildDate.php</a></li>
<li><a href="#branches60testsphpunittestsdategetPostTimephp">branches/6.0/tests/phpunit/tests/date/getPostTime.php</a></li>
<li><a href="#branches60testsphpunittestsdatemysql2datephp">branches/6.0/tests/phpunit/tests/date/mysql2date.php</a></li>
<li><a href="#branches60testsphpunittestsdatequeryphp">branches/6.0/tests/phpunit/tests/date/query.php</a></li>
<li><a href="#branches60testsphpunittestsdatewpTimezonephp">branches/6.0/tests/phpunit/tests/date/wpTimezone.php</a></li>
<li><a href="#branches60testsphpunittestsdatexmlrpcphp">branches/6.0/tests/phpunit/tests/date/xmlrpc.php</a></li>
<li><a href="#branches60testsphpunittestsformattingdatephp">branches/6.0/tests/phpunit/tests/formatting/date.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches60">branches/6.0/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/6.0
</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/6.0 2022-10-13 17:49:07 UTC (rev 54511)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/6.0 2022-10-14 05:58:20 UTC (rev 54512)
</ins><a id="branches60"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/6.0</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:53349,53352-53354,53358,53360,53362,53366,53368,53370,53372-53373,53375,53377-53378,53382-53383,53388,53402-53404,53409,53413,53416,53418-53421,53430,53437,53439,53442,53447-53448,53496,53540,53568,53581-53582,53588-53589,53592-53593,53631,53644,53646,53657,53659,53663,53665,53692,53704,53718,53725,53737,53793,53924,53927,53929,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:53349,53352-53354,53358,53360,53362,53366,53368,53370,53372-53373,53375,53377-53378,53382-53383,53388,53402-53404,53409,53413,53416,53418-53421,53430,53437,53439,53442,53447-53448,53496,53540,53568,53581-53582,53588-53589,53592-53593,53631,53644,53646,53657,53659,53663,53665,53692,53704,53718,53725,53737,53793,53924,53927,53929,53958-53960,54217,54322
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches60testsphpunittestsdatecurrentTimephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/currentTime.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/currentTime.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/currentTime.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdatedateI18nphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/dateI18n.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/dateI18n.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/dateI18n.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdategetFeedBuildDatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/getFeedBuildDate.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/getFeedBuildDate.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/getFeedBuildDate.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdategetPostTimephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/getPostTime.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/getPostTime.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/getPostTime.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdatemysql2datephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/mysql2date.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/mysql2date.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/mysql2date.php 2022-10-14 05:58:20 UTC (rev 54512)
</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"> public 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"> public 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">@@ -63,7 +63,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"> public function test_mysql2date_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"> $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">@@ -77,7 +77,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"> public function test_mysql2date_should_return_unix_timestamp_for_gmt_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( 'UTC' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $timestamp = $datetime->getTimestamp();
</span></span></pre></div>
<a id="branches60testsphpunittestsdatequeryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/query.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/query.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdatewpTimezonephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/wpTimezone.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/wpTimezone.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/wpTimezone.php 2022-10-14 05:58:20 UTC (rev 54512)
</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="branches60testsphpunittestsdatexmlrpcphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/date/xmlrpc.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/date/xmlrpc.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/date/xmlrpc.php 2022-10-14 05:58:20 UTC (rev 54512)
</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"> $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
</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">- $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">@@ -144,7 +144,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">@@ -213,7 +213,7 @@
</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><span class="cx" style="display: block; padding: 0 10px"> public function test_date_edit_comment() {
</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></pre></div>
<a id="branches60testsphpunittestsformattingdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/6.0/tests/phpunit/tests/formatting/date.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/6.0/tests/phpunit/tests/formatting/date.php 2022-10-13 17:49:07 UTC (rev 54511)
+++ branches/6.0/tests/phpunit/tests/formatting/date.php 2022-10-14 05:58:20 UTC (rev 54512)
</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>