Skip site navigation (1) Skip section navigation (2)

Re: BUG #1611: reading a date-field by "ResultSet.getTimestamp()"

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Ingolf Knopf <iknopf(at)csc-dd(dot)de>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1611: reading a date-field by "ResultSet.getTimestamp()"
Date: 2005-04-22 13:54:32
Message-ID: Pine.BSO.4.56.0504220851310.20536@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-bugs

On Fri, 22 Apr 2005, Oliver Jowett wrote:

> Ingolf Knopf wrote:
> > Bug reference:      1611
> > PostgreSQL version: 8.0.1
> > Operating system:   JDBC
> > Description:        reading a date-field by "ResultSet.getTimestamp()"
> > method analized dayligth flag
> > Details: 
> > 
> > Retrieving data by "java.sql.ResultSet" I read a data from a column which
> > has type DATE. I read content of this column by method
> > "ResultSet.getTimestamp( int )".
> > I get a "java.sql.Timestamp"-object, where Calendar.HOUR_OF_DAY==1. I
> > suppose, this is daylight flag.
> > 
> > Maybe this behavior of your JDBC driver is compatible with SQL standard, but
> > it is completely other than the behavior of "Oracle" or "Ingres".
> 
> Can you provide a compilable test case please?

I wrote this test, but I haven't really thought about what to do with it 
yet.  For me it shows:

2005-04-20
2005-04-20 16:00:00.0
420
2005-11-20
2005-11-20 16:00:00.0
480

Kris Jurka

Attachment: DateToTS.java
Description: text/plain (799 bytes)

In response to

pgsql-bugs by date

Next:From: matthias.schinacherDate: 2005-04-22 14:17:10
Subject: BUG #1619: ECPG allows definition of binary cursors but can't handle the result
Previous:From: Ingolf KnopfDate: 2005-04-22 13:21:03
Subject: Patch for Bug#1611

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group