Re: ResultSet.getDate

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: ResultSet.getDate
Дата
Msg-id Pine.LNX.4.04.9902011344220.3631-100000@maidast.retep.org.uk
обсуждение исходный текст
Ответ на ResultSet.getDate  (Peter Garner <peter_garner@yahoo.com>)
Список pgsql-interfaces
On Sat, 30 Jan 1999, Peter Garner wrote:

> Hi Peter! ;-)
>
> I think I may have found a problem in the postgres
> JDBC driver V6.4.  (BTW I assume the one I build from
> the released source in postgresql-6.4.2.tar.gz is the
> same as the jdbc6.4.jar downloadable from your web site
> at http://www.retep.org.uk/postgres ?  In anycase, the
> problem seems to occur with both.)
>
> Anyway I get an SQLException (well a parse exception,
> really), when attempting to use the ResultSet.getDate
> methods.  The exception messages are (I omitted the
> portions of the stack trace through my code):
>
> Bad Date Format: at 0 in Fri Jan 29 04:29:50 1999 UTC
>    at postgresql.ResultSet.getDate(ResultSet.java:408)
>
> Indeed, "Fri Jan 29 04:29:50 1999 UTC" is how dates are
> output from my postgres databases.  I am useing Redhat
> 5.2 and postgres built from the above mentioned source
> file.  The date format that is being selected for the
> date formatter (ResultSet.java, line #403) is
>
> "MM-dd-yyyy"
>
> Which is of course not what postgres sends.  Also, in
> looking at this code, it seems that the time portion
> is being thrown away in ResultSet.getDate, I am not
> sure if this is what is intended from looking at the
> JDBC API documentation published by Sun.

I'll check, but what version of the JDK/JRE are you using? The
java.util.Date class was broken in pre jdk1.1.6 VM's.

I am thinking on re-working the date handling for PostgreSQL 6.5, as I'm
still seeing problems with them.

Peter

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] Large objects, why not use the filesystem?
Следующее
От: nthomas@cise.ufl.edu (N. Thomas)
Дата:
Сообщение: web interface for v.6.4.2