[IronPython] Bug in time.strptime?

Mike Raath raathm at gmail.com
Mon Jul 3 11:50:48 CEST 2006

I'm getting an exception in IronPython which I don't get in CPython.

>From the CPython console window:

>>> import time, datetime
>>> d = time.strptime("July 3, 2006 At 0724 GMT", "%B %d, %Y At %H%M GMT")
>>> print d
(2006, 7, 3, 7, 24, 0, 0, 184, -1)

>From IronPython, a similar set of statements:

engine.Execute("import datetime")
engine.Execute("d = time.strptime(""July 3, 2006 At 0724 GMT"", ""%B %d, %Y
At %H%M GMT"")")

results in this exception:
The string was not recognized as a valid DateTime. There is a unknown word
starting at index 13.

The word starting at index 13 is the "At" but the format string provided
should tell strptime how to interpret it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060703/79e286d9/attachment.html>

More information about the Ironpython-users mailing list