Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 62610 invoked from network); 4 Nov 2008 13:19:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Nov 2008 13:19:23 -0000 Received: (qmail 91768 invoked by uid 500); 4 Nov 2008 13:19:29 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 91305 invoked by uid 500); 4 Nov 2008 13:19:28 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 91294 invoked by uid 99); 4 Nov 2008 13:19:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2008 05:19:28 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2008 13:18:11 +0000 Received: from fe-amer-09.sun.com ([192.18.109.79]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id mA4DIr3k025536 for ; Tue, 4 Nov 2008 13:18:53 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K9T00M018URXD00@mail-amer.sun.com> (original mail from Lance.Andersen@Sun.COM) for derby-user@db.apache.org; Tue, 04 Nov 2008 06:18:53 -0700 (MST) Received: from [192.168.1.100] ([70.22.219.164]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K9T005TA8ZFZJ60@mail-amer.sun.com> for derby-user@db.apache.org; Tue, 04 Nov 2008 06:18:52 -0700 (MST) Date: Tue, 04 Nov 2008 08:18:51 -0500 From: Lance Andersen Subject: Re: Date 2042-10-12 problem using Brasilia time zone In-reply-to: <5f211bd50811040510o292df72cud9d7fb3a4f94c623@mail.gmail.com> Sender: Lance.Andersen@Sun.COM To: Derby Discussion Message-id: <97E95AFA-18C8-4705-9E48-7538B9BF92AB@sun.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.929.2) Content-type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Content-transfer-encoding: 7BIT References: <5f211bd50810310720l531b597fv3c4149e51eaf0a35@mail.gmail.com> <490B16B6.50107@optrak.co.uk> <20081031144518.GA2263@atum01.Norway.Sun.COM> <20081031144959.GB2263@atum01.Norway.Sun.COM> <5f211bd50810310814v7a5cd5ccgb4c0178631853593@mail.gmail.com> <5f211bd50811030941n79569757n8ff8bb5ac991bc77@mail.gmail.com> <20081104082135.GA3250@atum01.Norway.Sun.COM> <2B9220EB-A07A-45CB-858C-C699ED127309@sun.com> <5f211bd50811040510o292df72cud9d7fb3a4f94c623@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Nov 4, 2008, at 8:10 AM, Thomas Mueller wrote: > Hi, > >> this is *not* an issue with java.sql.Date. > > I am not sure about that. java.sql.Date is nothing but a wrapper to java.util.Date, so what you pass in to the valueOf get passed directly to the constructor of java.util.Date(int,int, int). All of the work is done in java.util.Date. Regards Lance > > >> 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