Re: [BUG?] Extreme dates

From: Kris Jurka <books(at)ejurka(dot)com>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [BUG?] Extreme dates
Date: 2004-05-16 20:21:28
Message-ID: Pine.BSO.4.56.0405161516290.29033@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 16 May 2004, ow wrote:

> pg 7.4.2
> pgjdbc driver version 213
>
> Hi,
>
> 1) It appears that when saving 10/30/0002 (yes, 0002), the jdbc driver
> saves it as 02/11/2030.

I've tried to duplicate this and have failed. It does appear that Java is
doing something strange with the date, changing it to 11/30/0002, but I
don't understand why, and that has nothing to do with the JDBC driver or
the database. How are you constructing the date value to insert? Please
try the attached test and see what changes are necessary to get the
failure you describe.

>
> 2) May I suggest including version of the jdbc driver in the jar's
> META-INF/MANIFEST.MF file? Jars get renamed, etc but manifest always
> stays the same. There's Ant task for populating manifest properties.
>

The seems like a reasonable thing to do. You can currently determine the
version info from a randomly named pg jdbc jar file by using
org.postgresql.Driver.getVersion(), but that essentially requires writing
a dummy program to do so.

Kris Jurka

Attachment Content-Type Size
DateTest.java text/plain 884 bytes

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-05-16 20:33:09 Re: charset property is not working
Previous Message Andrea Aime 2004-05-16 16:34:34 Connection pooling, jdbc3 and encoding