[ 
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

        

Reply via email to