Message6131

Author proteusguy
Recipients proteusguy
Date 2010-10-04.05:36:43
SpamBayes Score 4.2082595e-09
Marked as misclassified No
Message-id <1286170605.19.0.616649613728.issue1662@psf.upfronthosting.co.za>
In-reply-to
Content
Trying to execute the following code works under c-python but fails
under jython:

import datetime
datetime.datetime.strptime("2010-07-05T09:20:24Z","%Y-%m-%dT%H:%M:%SZ")

results under Jython 2.5.2b1 (Release_2_5_2beta1:7075, Jun 28 2010, 07:44:20):
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/opt/jython2.5.2b1/Lib/datetime.py", line 1499, in strptime
   return cls(*(_time.strptime(date_string, format))[0:6])
       at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:783)
       at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:576)
       at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:501)
       at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:476)
       at org.python.modules.time.Time.strptime(Time.java:707)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)

java.lang.IllegalArgumentException:
java.lang.IllegalArgumentException: Unterminated quote


results under Python 2.6.4 (r264:75706, Jun 16 2010, 19:34:45):
datetime.datetime(2010, 7, 5, 9, 20, 24)
History
Date User Action Args
2010-10-04 05:36:45proteusguysetrecipients: + proteusguy
2010-10-04 05:36:45proteusguysetmessageid: <1286170605.19.0.616649613728.issue1662@psf.upfronthosting.co.za>
2010-10-04 05:36:45proteusguylinkissue1662 messages
2010-10-04 05:36:43proteusguycreate