Message6308

Author dbeckwith
Recipients dbeckwith
Date 2010-12-31.00:48:00
SpamBayes Score 9.4702024e-14
Marked as misclassified No
Message-id <1293756480.77.0.992817916671.issue1692@psf.upfronthosting.co.za>
In-reply-to
Content
import time
# Note that the format doesn't match.
# There should be dashes in the format.
# However, instead of giving an exception like in cpython, jython gives an
#  incorrect value.

jython -c "import time; print time.strptime('2010-12-25 00:00:00', '%Y%m%d')"
(2009, 11, 2, 0, 0, 0, 0, 306, -1)

python -c "import time; print time.strptime('2010-12-25 00:00:00', '%Y%m%d')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.6/_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib64/python2.6/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data '2010-12-25 00:00:00' does not match format '%Y%m%d'
History
Date User Action Args
2010-12-31 00:48:00dbeckwithsetrecipients: + dbeckwith
2010-12-31 00:48:00dbeckwithsetmessageid: <1293756480.77.0.992817916671.issue1692@psf.upfronthosting.co.za>
2010-12-31 00:48:00dbeckwithlinkissue1692 messages
2010-12-31 00:48:00dbeckwithcreate