Re: pear::date and soap::types::dateTime
| From: | Sandro Zic | Date: | Wed, 14 Aug 2002 09:08:56 +0000 |
| Subject: | Re: pear::date and soap::types::dateTime | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8418@lists.php.net to get a copy of this message | ||
On Mittwoch, 14. August 2002 08:46, Baba Buehler wrote:
> Shane Caraveo wrote:
> > Hey, at some time I'd like to get the dateTime class from the SOAP
> > library integrated over to the date stuff. I looked at the ISO support
> > in Date, and it's not sufficient to handle ISO-8601 format defined for
> > use in XML Schema (http://www.w3.org/TR/xmlschema-2/#isoformats).
By the way, there is also this W3C acknowledged submission (1997) available:
http://www.w3.org/TR/NOTE-datetime
> I've added some options to the format() method of Date in CVS that
> should allow you to better construct ISO 8601 strings:
>
> %o - gives the raw timezone offset in +/-hh:mm
> %O - gives the dst-corrected offset in +/-hh:mm
Excellent, thanks!
>
> Will this be sufficent, or would it be better to be able to retrieve
> the +/- seperate from the hh:mm offset?
Sufficient for me without the +/- separate.
>
> Could those working with SOAP and/or ISO8601 dates try the CVS Date.php
> and let me know how this works?
Works just fine.
>
> I'll look into adding ISO8601 format as a "native" format for the
> constructor and get/setDate methods.
I think that's the right way to go. It might be confusing that PEAR::Date uses
ISO 8601 as "native" format, but the formatting options of Date::format()
don't correspond to the lexical formats of ISO 8601, e.g.
ISO 8601: YYYY-MM-DDThh:mm:ssTZD
Date::format(): %Y-%m-%dT%H:%M:%S%O
Confusion might cause that ISO tags a month with a capital 'M' while
Date::format() uses lowercase 'm' - and the other way round concerning
minutes.
Sandro
>
> baba
--
Sandro Zic
oc4ware Project Manager
oc4ware - Software 4 Open Communities
http://www.oc4ware.org
oc4 e.V. - Association of Open Communities
http://www.oc4home.org