Skip to content

Commit 2d54786

Browse files
committed
minor #59162 [JsonEncoder] Fix timezone on DateTimeNormalizerTest fixture (alexandre-daubois)
This PR was merged into the 7.3 branch. Discussion ---------- [JsonEncoder] Fix timezone on `DateTimeNormalizerTest` fixture | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Fix CI on Windows. Commits ------- edf5830 [JsonEncoder] Fix timezone on `DateTimeNormalizerTest` fixture
2 parents bb8fc43 + edf5830 commit 2d54786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/JsonEncoder/Tests/Encode/Normalizer/DateTimeNormalizerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ public function testNormalize()
2323

2424
$this->assertEquals(
2525
'2023-07-26T00:00:00+00:00',
26-
$normalizer->normalize(new \DateTimeImmutable('2023-07-26'), []),
26+
$normalizer->normalize(new \DateTimeImmutable('2023-07-26', new \DateTimeZone('UTC')), []),
2727
);
2828

2929
$this->assertEquals(
3030
'26/07/2023 00:00:00',
31-
$normalizer->normalize((new \DateTimeImmutable('2023-07-26'))->setTime(0, 0), [DateTimeNormalizer::FORMAT_KEY => 'd/m/Y H:i:s']),
31+
$normalizer->normalize((new \DateTimeImmutable('2023-07-26', new \DateTimeZone('UTC')))->setTime(0, 0), [DateTimeNormalizer::FORMAT_KEY => 'd/m/Y H:i:s']),
3232
);
3333
}
3434

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy