[ 
http://issues.apache.org/jira/browse/DERBY-889?page=comments#action_12432379 ] 
            
Bryan Pendleton commented on DERBY-889:
---------------------------------------

The client's implementation of the "with-calendar" form of the getTimestamp 
methods uses the passed-in calendar 
only to perform a timezone adjustment. getDate(), getTime(), and getTimestamp() 
are all similar in this respect. So the 
DERBY-889 bug also occurs when a Calendar is passed to getTimestamp().

The relevant code is around lines 875-1050 in 
org.apache.derby.client.am.ResultSet

I see your point about the strange contract of java.sql.Timestamp, though we've 
clearly been getting away with this for many years.

I think that, now that DERBY-1811 is broken out, DERBY-889 no longer blocks 
DERBY-1700, right?

So I think that the right plan is this:
 - fix DERBY-1811 first
 - then I'll revisit this patch, removing the embedded fix, adding tests for 
the "with-calendar" form of getTimestamp,
   and looking at the issue you raised about java.sql.Timestamp's inheritance 
from java.util.Date.

For the time being, I'm going to clear Patch Available because the current 
patch needs further work.


> 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

        

Reply via email to