This is a tough question that I came across before. I used annotations, so my fix looked like this:
@Serializer\Type("DateTime<'Y-m-d\TH:i:s.uT'>")
So, I assume yours will look like this:
jms_serializer:
handlers:
datetime:
default_format: 'Y-m-d\TH:i:s.uT'
Or you may have to add another slash before “TH” if jms reads yaml files other than annotations.
, , , , . , .