Message11182
Okay, overlooked that #2524 is about datetime.time. So ignore what I wrote regarding that (you might still want to review that fix...?)
If we change datetime.date.__tojava__ to the following:
if _is_jython:
def __tojava__(self, java_class):
if java_class not in (Calendar, Date, Object):
return Py.NoConversion
if java_class == Calendar:
calendar = _make_java_utc_calendar()
calendar.set(self.year, self.month - 1, self.day)
return calendar
else:
calendar = _make_java_default_calendar()
calendar.set(self.year, self.month - 1, self.day)
return Date(calendar.getTimeInMillis())
with
def _make_java_default_calendar():
return GregorianCalendar(0, 0, 0, 0, 0, 0)
would that fix it for you? Could you please try that? |
|
Date |
User |
Action |
Args |
2017-03-05 00:45:36 | stefan.richthofer | set | messageid: <1488674736.03.0.379934435857.issue2504@psf.upfronthosting.co.za> |
2017-03-05 00:45:36 | stefan.richthofer | set | recipients:
+ stefan.richthofer, zyasoft, ttakamiy |
2017-03-05 00:45:36 | stefan.richthofer | link | issue2504 messages |
2017-03-05 00:45:35 | stefan.richthofer | create | |
|