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';
}