Skip to content

Commit a21ac0c

Browse files
andreyboloninjaviereguiluz
authored andcommitted
Update serializer.rst
1 parent 4511703 commit a21ac0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/serializer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ When serializing, you can set a callback to format a specific object property::
799799

800800
// all callback parameters are optional (you can omit the ones you don't use)
801801
$dateCallback = function ($innerObject, $outerObject, string $attributeName, ?string $format = null, array $context = []) {
802-
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
802+
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ATOM) : '';
803803
};
804804

805805
$defaultContext = [

0 commit comments

Comments
 (0)