Message11182

Author stefan.richthofer
Recipients stefan.richthofer, ttakamiy, zyasoft
Date 2017-03-05.00:45:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488674736.03.0.379934435857.issue2504@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-03-05 00:45:36stefan.richthofersetmessageid: <1488674736.03.0.379934435857.issue2504@psf.upfronthosting.co.za>
2017-03-05 00:45:36stefan.richthofersetrecipients: + stefan.richthofer, zyasoft, ttakamiy
2017-03-05 00:45:36stefan.richthoferlinkissue2504 messages
2017-03-05 00:45:35stefan.richthofercreate