From a21ac0c8c2c62b5e4a8f9184b704af05303bddd0 Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Mon, 17 Jun 2024 21:01:56 +0300 Subject: [PATCH] Update serializer.rst --- components/serializer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/serializer.rst b/components/serializer.rst index fedd41cf08b..bbf31afacf8 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -799,7 +799,7 @@ When serializing, you can set a callback to format a specific object property:: // all callback parameters are optional (you can omit the ones you don't use) $dateCallback = function ($innerObject, $outerObject, string $attributeName, ?string $format = null, array $context = []) { - return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : ''; + return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ATOM) : ''; }; $defaultContext = [