Skip to content

Commit f814006

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Serializer] Better example for date denormalization
2 parents 21e4f7d + 0953037 commit f814006

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
@@ -212,7 +212,7 @@ Use the options to specify context specific to normalization or denormalization:
212212
{
213213
#[Context(
214214
normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'],
215-
denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339],
215+
denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => '!Y-m-d'], // To prevent to have the time from the moment of denormalization
216216
)]
217217
public \DateTimeInterface $createdAt;
218218

0 commit comments

Comments
 (0)