From 3fd4e0e19ff2c9e77a88a448a7e3780f22ba4ab2 Mon Sep 17 00:00:00 2001 From: Andrea Sprega Date: Mon, 4 Apr 2022 14:37:27 +0200 Subject: [PATCH] fixup! Fix to wrong time when a DateTime with a specific timezone is created while ClockMock is active - Add test --- tests/ClockMockTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ClockMockTest.php b/tests/ClockMockTest.php index 4c0d816..57c46fd 100644 --- a/tests/ClockMockTest.php +++ b/tests/ClockMockTest.php @@ -67,7 +67,7 @@ public function test_DateTime_constructor_with_microseconds_and_specific_timezon ClockMock::freeze(new \DateTime('2022-04-04 14:26:29.123456')); // UTC, +00:00 // Reconstruct the current date (which is now based on the one mocked above) but apply a specific timezone. The - // resulting date should have its time modified accordingly to the timWezone. + // resulting date should have its time modified accordingly to the timezone. $nowWithIndiaTimezone = new \DateTime('now', $indiaTimezone = new \DateTimeZone('+05:30')); $this->assertEquals($indiaTimezone, $nowWithIndiaTimezone->getTimezone());