From a14ea360e203a0d6ae965ea470155e75622db1ca Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 29 Feb 2024 10:45:52 +0900 Subject: [PATCH] test: remove unnecessary timezone America/Chicago It is wrong to change the timezone only to setTestNow(). Remnants of the old code? Now UTC is the default timezone. --- tests/system/I18n/TimeLegacyTest.php | 8 ++++---- tests/system/I18n/TimeTest.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/system/I18n/TimeLegacyTest.php b/tests/system/I18n/TimeLegacyTest.php index 9f013a0ddcbe..5814683ba6c7 100644 --- a/tests/system/I18n/TimeLegacyTest.php +++ b/tests/system/I18n/TimeLegacyTest.php @@ -419,7 +419,7 @@ public function testAgeNow(): void public function testAgeFuture(): void { - TimeLegacy::setTestNow('June 20, 2022', 'America/Chicago'); + TimeLegacy::setTestNow('June 20, 2022'); $time = TimeLegacy::parse('August 12, 2116 4:15:23pm'); $this->assertSame(0, $time->getAge()); @@ -427,7 +427,7 @@ public function testAgeFuture(): void public function testGetAgeSameDayOfBirthday(): void { - TimeLegacy::setTestNow('December 31, 2022', 'America/Chicago'); + TimeLegacy::setTestNow('December 31, 2022'); $time = TimeLegacy::parse('December 31, 2020'); $this->assertSame(2, $time->getAge()); @@ -435,7 +435,7 @@ public function testGetAgeSameDayOfBirthday(): void public function testGetAgeNextDayOfBirthday(): void { - TimeLegacy::setTestNow('January 1, 2022', 'America/Chicago'); + TimeLegacy::setTestNow('January 1, 2022'); $time = TimeLegacy::parse('December 31, 2020'); $this->assertSame(1, $time->getAge()); @@ -443,7 +443,7 @@ public function testGetAgeNextDayOfBirthday(): void public function testGetAgeBeforeDayOfBirthday(): void { - TimeLegacy::setTestNow('December 30, 2021', 'America/Chicago'); + TimeLegacy::setTestNow('December 30, 2021'); $time = TimeLegacy::parse('December 31, 2020'); $this->assertSame(0, $time->getAge()); diff --git a/tests/system/I18n/TimeTest.php b/tests/system/I18n/TimeTest.php index f5bca98268fb..db34590eadeb 100644 --- a/tests/system/I18n/TimeTest.php +++ b/tests/system/I18n/TimeTest.php @@ -426,7 +426,7 @@ public function testAgeNow(): void public function testAgeFuture(): void { - Time::setTestNow('June 20, 2022', 'America/Chicago'); + Time::setTestNow('June 20, 2022'); $time = Time::parse('August 12, 2116 4:15:23pm'); $this->assertSame(0, $time->getAge()); @@ -434,7 +434,7 @@ public function testAgeFuture(): void public function testGetAgeSameDayOfBirthday(): void { - Time::setTestNow('December 31, 2022', 'America/Chicago'); + Time::setTestNow('December 31, 2022'); $time = Time::parse('December 31, 2020'); $this->assertSame(2, $time->getAge()); @@ -442,7 +442,7 @@ public function testGetAgeSameDayOfBirthday(): void public function testGetAgeNextDayOfBirthday(): void { - Time::setTestNow('January 1, 2022', 'America/Chicago'); + Time::setTestNow('January 1, 2022'); $time = Time::parse('December 31, 2020'); $this->assertSame(1, $time->getAge()); @@ -450,7 +450,7 @@ public function testGetAgeNextDayOfBirthday(): void public function testGetAgeBeforeDayOfBirthday(): void { - Time::setTestNow('December 30, 2021', 'America/Chicago'); + Time::setTestNow('December 30, 2021'); $time = Time::parse('December 31, 2020'); $this->assertSame(0, $time->getAge());