Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45119 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47345 invoked from network); 28 Jul 2009 11:32:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2009 11:32:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:60388] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/24-25592-6E1EE6A4 for ; Tue, 28 Jul 2009 07:32:55 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id 27BE550444; Tue, 28 Jul 2009 14:33:16 +0300 (IDT) Received: from tpl.home ([10.1.10.16]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 28 Jul 2009 14:33:44 +0300 Message-ID: <4A6EE1BF.8080409@zend.com> Date: Tue, 28 Jul 2009 15:32:15 +0400 User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: =?ISO-8859-1?Q?David_Z=FClke?= CC: php-dev List References: <67DEF003-A344-4BE6-9C23-6BB48935786F@bitextender.com> In-Reply-To: <67DEF003-A344-4BE6-9C23-6BB48935786F@bitextender.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 X-OriginalArrivalTime: 28 Jul 2009 11:33:46.0128 (UTC) FILETIME=[44AE5100:01CA0F77] Content-Transfer-Encoding: quoted-printable Subject: Re: SOAP_MARSHAL_DATETIME (or: bug #44383) From: dmitry@zend.com (Dmitry Stogov) Hi David, I took only a quick look, but I like the patch. In case it doesn't break any tests, it should be committed at least into HEAD. I agree to commit it into 5.3 too, but RMs take the final decision. The only thing I didn't understood - why win32/php_stdint.h is needed. Thanks. Dmitry. David Z=FClke wrote: > *bump* >=20 > Dmitry, did you have a chance to review this patch yet? >=20 > - David >=20 >=20 > On 22.06.2009, at 15:21, David Z=FClke wrote: >=20 >> Hi folks, >> >> attached is a patch (with the respective test cases) that implements >> DateTime marshalling from and to xsd:dateTime in ext/soap as requested >> in http://bugs.php.net/44383 >> >> Right now, it is implemented for xsd:date, xsd:time and xsd:dateTime, >> but not for other types defined in W3C XML Schema such as gDayMonth; I >> don't really think it makes sense mapping from and to DateTimes in >> this case (from DateTime to gDayMonth would work, but the other way >> round would prove rather difficult). >> >> Some notes about this patch: >> - it conforms strictly to the XML Schema specification by only >> producing canonical representations of values when generating >> xsd:dateTime and xsd:time values. Specifically: >> - it will not generate trailing zeroes on microseconds (in other >> words, it simply generates a fractional second part as mandated by the >> specification), but it will accept such values >> - UTC is always used as the timezone (one of the tests in >> ext/date/tests that mirrors SBR1-echoDate from >> http://www.w3.org/TR/2007/REC-soap12-testcollection-20070427/#SBR1-ech= oDate currently >> does this wrong), but it will accept any timezone >> - xsd:time produces current date when generating a DateTime object >> - xsd:date is relatively straightfoward as well: >> - produces "00:00:00" as the time when creating a DateTime object >> - accepts any time when parsing >> - also supports timezones >> - as a side effect of the patch, microseconds are now supported in >> time values (for xsd:time and xsd:dateTime), hence the removed comment >> in to_xml_time >> >> The tests have several permutations, but all but one is commented out >> each. The test_schema() function does some odd (but understandable) >> stunts with output buffering and global variables that make it >> impossible to test more than one case at a time. We didn't want to >> produce a million test files for the several variants; is there a >> nicer way to test this properly? >> >> This feature is enabled by a SoapClient "feature" called >> SOAP_MARSHAL_DATETIME. I think this is a reasonable choice. >> >> Greetings, >> >> David >> >> >> >=20