Braintree\Xml\Generator::_dateTimeToXmlTimestamp PHP Method

_dateTimeToXmlTimestamp() private static method

converts datetime back to xml schema format
private static _dateTimeToXmlTimestamp ( object $dateTime ) : string
$dateTime object
return string XML schema formatted timestamp
    private static function _dateTimeToXmlTimestamp($dateTime)
    {
        $dateTimeForUTC = clone $dateTime;
        $dateTimeForUTC->setTimeZone(new DateTimeZone('UTC'));
        return $dateTimeForUTC->format('Y-m-d\\TH:i:s') . 'Z';
    }