diff -r a6c6c30cda02 Lib/test/test_strptime_jy.py --- a/Lib/test/test_strptime_jy.py Mon Jan 13 16:44:18 2014 -0800 +++ b/Lib/test/test_strptime_jy.py Mon Jan 13 22:46:20 2014 -0800 @@ -20,7 +20,11 @@ def test_issue1964(self): d = strptime('0', '%f') - self.assertEqual(0, d[1]) + self.assertEqual(1900, d.tm_year) + + def test_issue2112(self): + d = strptime('1', '%d') + self.assertEqual(1900, d.tm_year) def test_main(): test_support.run_unittest( diff -r a6c6c30cda02 src/org/python/modules/time/Time.java --- a/src/org/python/modules/time/Time.java Mon Jan 13 16:44:18 2014 -0800 +++ b/src/org/python/modules/time/Time.java Mon Jan 13 22:46:20 2014 -0800 @@ -688,12 +688,14 @@ */ private static PyTuple pystrptime(String data_string, String format) { return (PyTuple) __builtin__.__import__("_strptime") - .invoke("_strptime", + .invoke("_strptime_time", Py.newUnicode(data_string), Py.newUnicode(format)); } public static PyTuple strptime(String data_string, String format) { + return pystrptime(data_string, format); + /* if (format == null || data_string == null) { // this is not a very interesting error message, but it's the same // as what CPython outputs @@ -721,6 +723,7 @@ isdst = cal.getTimeZone().inDaylightTime(cal.getTime()) ? 1 : 0; } return toTimeTuple(cal, isdst); + */ } private static final String DEFAULT_FORMAT_PY = "%a %b %d %H:%M:%S %Y";