Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76381 invoked from network); 3 Sep 2006 16:07:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Sep 2006 16:07:50 -0000 Received: (qmail 26977 invoked by uid 500); 3 Sep 2006 16:07:49 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 26933 invoked by uid 500); 3 Sep 2006 16:07:49 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 26924 invoked by uid 99); 3 Sep 2006 16:07:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 09:07:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 09:07:49 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5256771430C for ; Sun, 3 Sep 2006 16:04:23 +0000 (GMT) Message-ID: <9399598.1157299463334.JavaMail.jira@brutus> Date: Sun, 3 Sep 2006 09:04:23 -0700 (PDT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-889) with client getTimestamp on a TIME column will print the date 1900-01-01 instead of the current date In-Reply-To: <2013405366.1138509152955.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-889?page=comments#action_12432352 ] Daniel John Debrunner commented on DERBY-889: --------------------------------------------- Yes, I split t because the embedded behaviour (I think) is a more serious bug, it can return a totally incorrect date even though simple tests can show it as working. The client side had fixed behaviour. I attached a patch to DERBY-1811 for the embedded changes. Not ready for commit yet, need some more testing, I'm adding a JUnit test case. For your client changes they look correct in that they perform the desired behaviour, but I wonder if they should use the correct mechanism and use a Calendar object. java.sql.Timstamp is a strange class in that its javadoc states its super class of java.util.Date should be seen as an implementation detail and not part of its api. So methods like setDate() etc. are not really part of the contract of java.sql.Timestamp. How does the client handle the getTimestamp methods that pass in a Calendar? > with client getTimestamp on a TIME column will print the date 1900-01-01 instead of the current date > ----------------------------------------------------------------------------------------------------- > > Key: DERBY-889 > URL: http://issues.apache.org/jira/browse/DERBY-889 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.1.2.1, 10.1.2.2, 10.2.1.0, 10.1.3.0 > Reporter: Kathey Marsden > Assigned To: Bryan Pendleton > Attachments: derby-889-updated-Aug-2006.diff, derby-889.diff > > > On client getTimestamp on a TIME column will print date 1900-01-01 instead of the current date like the embedded driver. > To repro run the DERBY-877 repro without specifying a file.encoding > java TestEnc derbynetclient > [snip] > COLUMN 2:TM TIME > getString: 16:27:35 > getTimeStamp: 1900-01-01 16:27:35.0 > getTime: 16:27:35 > getDate Exception SQLSTATE:null (EXPECTED) > With Embedded it prints the current date for getTimestamp > java TestEnc derby > COLUMN 2:TM TIME > getString: 16:27:35 > getTimeStamp: 2006-01-28 16:27:35.0 > getTime: 16:27:35 > getDate Exception SQLSTATE:22005 (EXPECTED) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira