[egenix-users] Unsupported ISO format string
mal at egenix.com
Wed Apr 9 23:55:16 CEST 2008
On 2008-04-09 20:27, David Huard wrote:
> Hi all,
> I just wanted to point out that the Date parser in mx.DateTime does not
> seem to interpret correctly the hour field in the following ISO string:
> In : dt.DateFrom('1979-01-01T01')
> Out: <mx.DateTime.DateTime object for '1979-01-01 00:00:00.00' at
> The problem is related to the fact that the minute group is not optional.
> Putting it optional doesn't solve the problem since the regular
> expression relies on the presence of : to identify the time string, which
> is absent in this case.
> Unless I'm wrong, this use case is ISO 8601 compliant.
> I patched my local copy, but let's say it's a rather ugly hack based on
> adding an isoT regular expression.
Thanks for letting us know. The generic parser tries to parse the
date and time parts in two steps. To fix this issue, we'll have
to add support for parsing both in one go.
I'll add a ticket for that and see whether we can add support for
this in the next release.
Professional Python Services directly from the Source (#1, Apr 09 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the egenix-users