Re: [BUG?] Extreme dates - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [BUG?] Extreme dates
Date
Msg-id Pine.BSO.4.56.0405161516290.29033@leary.csoft.net
Whole thread Raw
In response to [BUG?] Extreme dates  (ow <oneway_111@yahoo.com>)
List 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

pgsql-jdbc by date:

Previous
From: "Katalina Marcos"
Date:
Subject: charset property is not working
Next
From: Kris Jurka
Date:
Subject: Re: charset property is not working