From fd3efb7f6b7585cd0d9fc0157fda8fcb9ef2b58e Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Sun, 4 Apr 2021 08:56:46 +0100 Subject: [PATCH] Issue #3207086 by benjifisher, larowlan, mondrake, Spokje: [HEAD BROKEN] Consistent failure in MonthDatePluginTest --- .../src/Functional/Plugin/MonthDatePluginTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php index 2f6712432aa6..3f3f2abfd253 100644 --- a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php @@ -50,10 +50,14 @@ class MonthDatePluginTest extends ViewTestBase { */ public function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); - $date1 = '2020-10-01 00:00:00'; - $this->node1 = $this->drupalCreateNode(['created' => strtotime($date1)]); - $date2 = '2020-11-01 00:00:00'; - $this->node2 = $this->drupalCreateNode(['created' => strtotime($date2)]); + $utc = new \DateTimeZone('UTC'); + $format = 'Y-m-d h:i:s'; + $this->node1 = $this->drupalCreateNode([ + 'created' => \DateTime::createFromFormat($format, '2020-10-01 00:00:00', $utc)->getTimestamp(), + ]); + $this->node2 = $this->drupalCreateNode([ + 'created' => \DateTime::createFromFormat($format, '2020-11-01 00:00:00', $utc)->getTimestamp(), + ]); } /** -- GitLab