Skip to content

Commit c4cc6a6

Browse files
Update serializer.rst
1 parent fd7b8ea commit c4cc6a6

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
@@ -757,7 +757,7 @@ When serializing, you can set a callback to format a specific object property::
757757

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

763763
$defaultContext = [

0 commit comments

Comments
 (0)