db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@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
Date Mon, 06 Mar 2006 01:55:33 GMT
    [ http://issues.apache.org/jira/browse/DERBY-889?page=comments#action_12368965 ] 

Bryan Pendleton commented on DERBY-889:
---------------------------------------

I'm not quite sure I understand what reason there is to believe that the client code is wrong
here. Why is 1900-01-01 incorrect? In some ways, I think that the client code is more correct.
There is no value for the date portion of the data, so providing a value of 1900-01-01 has
certain advantages compared to providing "today's" date. I hunted around in the JDBC specs
for a while but couldn't find a clear statement about which behavior is correct.

> 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
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0, 10.1.2.1, 10.1.3.0, 10.1.2.2
>     Reporter: Kathey Marsden

>
> 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


Mime
View raw message