Received: from localhost.localdomain (cx480346-a.chspk1.va.home.com [24.6.188.64]) by hub.org (8.10.1/8.10.1) with ESMTP id e75CUaG66305 for ; Sat, 5 Aug 2000 08:30:36 -0400 (EDT) Received: from greatbridge.com (IDENT:ryan@cryan [127.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id IAA03099 for ; Sat, 5 Aug 2000 08:28:31 -0400 Message-ID: <398C07F5.FE194B49@greatbridge.com> Date: Sat, 05 Aug 2000 08:26:29 -0400 From: Chris Ryan Organization: GreatBridge LLC X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-6.1.1 i686) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-interfaces@postgresql.org" Subject: JDBC and Timestamps Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/50 I'm working on a project where I update/insert/select records through JDBC and I'm noticing problems with the timestamp fields. The JDBC driver when writing a Timestamp value to postgres is passing the value to the backend as a String in the following format "yyyy-mm-dd hh:mm:ss.fffffffff" <-- the last part .fffffffff is nanosecs. When Postgres reads this is things it is millisecs so converts it and appends the timezone. Now when the JDBC driver reads the value back in it is trying to do a date conversion from a string using the format "yyyy-mm-dd hh:mm:sszzz" which has timezone but no millisecs. The different formats of course cause exceptions to be generated. I tried using the setLenient(true) but this didn't make any difference. Chris Ryan