src/Graviton/DocumentBundle/Serializer/Handler/DateHandler.php
public function serializeDateTime(VisitorInterface $visitor, \DateTime $date, array $type, Context $context)
    {
        return $visitor->visitString($this->dateConverter->formatDateTime($date), $type, $context);
    }
public function serializeDateTime(VisitorInterface $visitor, \DateTime $date, array $type, Context $context)
    {
        return $visitor->visitString($this->dateConverter->formatDateTime($date), $type, $context);
    }
public function serializeDateTime ( VisitorInterface $ visitor , \ DateTime $ date , array $ type , Context $ context ) { return $ visitor -> visitString ( $ this -> dateConverter -> formatDateTime ( $ date ) , $ type , $ context ) ; }
serialize datetime to json

@param VisitorInterface $visitor visitor
@param \DateTime        $date    data
@param array            $type    type
@param Context          $context context

@return string serialized date
serialize datetime to json