src/Types/AbstractDateTime.php
protected static function parse($value, \DateTimeZone $timezone = null)
    {
        if ($timezone === null) {
            $timezone = new \DateTimeZone(@date_default_timezone_get());
        }

        $result = \DateTime::createFromFormat(static::XMLRPC_FORMAT, $value, $timezone);

        if (!is_object($result) || strcasecmp($value, $result->format(static::XMLRPC_FORMAT))) {
            throw new \InvalidArgumentException('Invalid date/time');
        }

        return $result;
    }
protected static function parse($value, \DateTimeZone $timezone = null)
    {
        if ($timezone === null) {
            $timezone = new \DateTimeZone(@date_default_timezone_get());
        }

        $result = \DateTime::createFromFormat(static::XMLRPC_FORMAT, $value, $timezone);

        if (!is_object($result) || strcasecmp($value, $result->format(static::XMLRPC_FORMAT))) {
            throw new \InvalidArgumentException('Invalid date/time');
        }

        return $result;
    }
/ \copydoc fpoirotte::XRL::Types::AbstractType::parse()