src/Types/AbstractDateTime.php
public function write(\XMLWriter $writer, \DateTimeZone $timezone, $stringTag)
    {
        // PHP has serious issues with timezone handling.
        // As a workaround, we use format(), specifying a UNIX timestamp
        // as the format to use, which we then reinject in a new DateTime.
        $date = new \DateTime('@'.$this->value->format('U'), $timezone);
        if (strpos(static::XMLRPC_TYPE, '}') !== false) {
            list($ns, $tagName) = explode('}', static::XMLRPC_TYPE, 2);
            $ns = (string) substr($ns, 1);
            return $writer->writeElementNS('ex', $tagName, $ns, $date->format(static::XMLRPC_FORMAT));
        }
        return $writer->writeElement(static::XMLRPC_TYPE, $date->format(static::XMLRPC_FORMAT));
    }
public function write(\XMLWriter $writer, \DateTimeZone $timezone, $stringTag)
    {
        // PHP has serious issues with timezone handling.
        // As a workaround, we use format(), specifying a UNIX timestamp
        // as the format to use, which we then reinject in a new DateTime.
        $date = new \DateTime('@'.$this->value->format('U'), $timezone);
        if (strpos(static::XMLRPC_TYPE, '}') !== false) {
            list($ns, $tagName) = explode('}', static::XMLRPC_TYPE, 2);
            $ns = (string) substr($ns, 1);
            return $writer->writeElementNS('ex', $tagName, $ns, $date->format(static::XMLRPC_FORMAT));
        }
        return $writer->writeElement(static::XMLRPC_TYPE, $date->format(static::XMLRPC_FORMAT));
    }
/ \copydoc fpoirotte::XRL::Types::AbstractType::write()