Skip to content

Commit 0953037

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Serializer] Better example for date denormalization
2 parents 72cf82a + c6504bd commit 0953037

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Use the options to specify context specific to normalization or denormalization:
216216
{
217217
#[Context(
218218
normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'],
219-
denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339],
219+
denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => '!Y-m-d'], // To prevent to have the time from the moment of denormalization
220220
)]
221221
public \DateTimeInterface $createdAt;
222222

0 commit comments

Comments
 (0)