src/Common/Internal/Utilities.php
public static function convertToEdmDateTime($value)
    {
        if (empty($value)) {
            return $value;
        }

        if (is_string($value)) {
            $value = self::convertToDateTime($value);
        }

        Validate::isDate($value, 'value');

        $cloned = clone $value;
        $cloned->setTimezone(new \DateTimeZone('UTC'));

        return str_replace('+0000', 'Z', $cloned->format(\DateTime::ISO8601));
    }
public static function convertToEdmDateTime($value)
    {
        if (empty($value)) {
            return $value;
        }

        if (is_string($value)) {
            $value = self::convertToDateTime($value);
        }

        Validate::isDate($value, 'value');

        $cloned = clone $value;
        $cloned->setTimezone(new \DateTimeZone('UTC'));

        return str_replace('+0000', 'Z', $cloned->format(\DateTime::ISO8601));
    }
public static function convertToEdmDateTime ( $ value ) { if ( empty ( $ value ) ) { return $ value ; } if ( is_string ( $ value ) ) { $ value = self :: convertToDateTime ( $ value ) ; } Validate :: isDate ( $ value , 'value' ) ; $ cloned = clone $ value ; $ cloned -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; return str_replace ( '+0000' , 'Z' , $ cloned -> format ( \ DateTime :: ISO8601 ) ) ; }
Converts a DateTime object into an Edm.DaeTime value in UTC timezone,
represented as a string.

@param \DateTime $value The datetime value

@static

@return string
Converts a DateTime object into an Edm . DaeTime value in UTC timezone represented as a string .