This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients BreamoreBoy, flox, loewis, neologix, schmir, vdupras
Date 2011-10-31.10:55:15
SpamBayes Score 1.547773e-07
Marked as misclassified No
Message-id <>
2096158376e5 broke test_xmlrpc:

ERROR: test_datetime_before_1900 (test.test_xmlrpc.XMLRPCTestCase)
Traceback (most recent call last):
  File "/home/cf/python/cpython/Lib/test/", line 62, in test_datetime_before_1900
    (newdt,), m = xmlrpclib.loads(s, use_datetime=1)
  File "/home/cf/python/cpython/Lib/xmlrpc/", line 969, in loads
  File "/home/cf/python/cpython/Lib/xmlrpc/", line 430, in feed
    self._parser.Parse(data, 0)
  File "/home/cf/python/cpython/Lib/xmlrpc/", line 662, in end
    return f(self, "".join(self._data))
  File "/home/cf/python/cpython/Lib/xmlrpc/", line 745, in end_dateTime
    value = _datetime_type(data)
  File "/home/cf/python/cpython/Lib/xmlrpc/", line 359, in _datetime_type
    return datetime.strptime(data, "%Y%m%dT%H:%M:%S")
  File "/home/cf/python/cpython/Lib/", line 488, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/home/cf/python/cpython/Lib/", line 337, in _strptime
    (data_string, format))
ValueError: time data '10210T11:41:23' does not match format '%Y%m%dT%H:%M:%S'


That's because datetime.strptime() expects a year ("%Y") on exactly 4 digits:
            #XXX: Does 'Y' need to worry about having less or more than
            #     4 digits?
            'Y': r"(?P<Y>\d\d\d\d)",
Date User Action Args
2011-10-31 10:55:16neologixsetrecipients: + neologix, loewis, schmir, vdupras, flox, BreamoreBoy
2011-10-31 10:55:16neologixsetmessageid: <>
2011-10-31 10:55:16neologixlinkissue2979 messages
2011-10-31 10:55:15neologixcreate