Message8230
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. |
|
Date |
User |
Action |
Args |
2014-01-14 06:46:45 | santa4nt | set | messageid: <1389682005.47.0.571699639935.issue2112@psf.upfronthosting.co.za> |
2014-01-14 06:46:45 | santa4nt | set | recipients:
+ santa4nt, jeff.allen, Arfrever |
2014-01-14 06:46:45 | santa4nt | link | issue2112 messages |
2014-01-14 06:46:45 | santa4nt | create | |
|