DatatypeNormalizer/DateTimeNormalizer.php
public function normalize($object, $format = null, array $context = array())
    {
        $dt = clone $object;
        $dt->setTimezone(new \DateTimeZone('UTC'));

        return $object->format(self::XSD_DATETIME_FORMAT);
    }
public function normalize($object, $format = null, array $context = array())
    {
        $dt = clone $object;
        $dt->setTimezone(new \DateTimeZone('UTC'));

        return $object->format(self::XSD_DATETIME_FORMAT);
    }
Normalizes an object into a set of arrays/scalars

@param object $object object to normalize
@param string $format format the normalization result will be encoded as
@param array  $context Context options for the normalizer

@return string