Message8230

Author santa4nt
Recipients Arfrever, jeff.allen, santa4nt
Date 2014-01-14.06:46:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389682005.47.0.571699639935.issue2112@psf.upfronthosting.co.za>
In-reply-to
Content
This is because the underlying date formatter, Java's SimpleDateFormat, uses a calendar that starts from 1970, absent a year given to the parser.

Actually, comparing to cpython implementation, the native code of _time module just simply calls back to a python function in _strptime.py, which jython also packages.

I don't know why the code exists right now to try to use Java's SimpleDateFormat (and falls back to _strptime.py when odd format spec is encountered) instead of just falling back immediately to _strptime.py regardless.

Attaching a proposed patch that comments out the seemingly extraneous Java code (unless I'm missing the original rationale for that code to begin with?). If accepted, might want to clean it up first and delete some code instead of simply commenting out.
History
Date User Action Args
2014-01-14 06:46:45santa4ntsetmessageid: <1389682005.47.0.571699639935.issue2112@psf.upfronthosting.co.za>
2014-01-14 06:46:45santa4ntsetrecipients: + santa4nt, jeff.allen, Arfrever
2014-01-14 06:46:45santa4ntlinkissue2112 messages
2014-01-14 06:46:45santa4ntcreate