db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: Date 2042-10-12 problem using Brasilia time zone
Date Tue, 04 Nov 2008 13:10:40 GMT
Hi,

> this is *not* an issue with java.sql.Date.

I am not sure about that.

> java.sql.Date.valueOf()  calls java.util.Date(int,int,int) and if you modify
> your test program, you will see the same results from java.util.Date.

I submitted the problem even without knowing the exact root cause. If
you found the root cause of the problem, or if you even know how to
fix it, that would be great of course!

It looks like midnight of that day doesn't exist because it is the
beginning or end of the daylight saving time. Where I live this change
occurs at 2 am, but in some countries the change is at or near
midnight. From what I know, java.util.Calendar doesn't allow to set
'invalid' hours, and if using the lenient setting it will 'fix' the
time. Maybe the reason is that midnight of that day is set to 11 pm of
the previous day. This change may be the expected behavior of
java.util.Date / Calendar, but for java.sql.Date it is a problem. So
maybe it is required to fix java.sql.Date, not java.util.Date. But I
am not sure because I didn't debug it so far.

>  Please update any submitted bug

I don't see a way to update the bug. I got a mail saying: "Your report
has been assigned an internal review ID of 1384760, which is NOT
visible on the Sun Developer Network (SDN)". There is no link.

Regards,
Thomas

Mime
View raw message