Received: from ns.gcom.ru (Garant-Siberia-PostOffice.gcom.ru [194.84.180.33]) by hub.org (8.8.8/8.8.8) with ESMTP id CAA12441 for ; Fri, 16 Oct 1998 02:09:55 -0400 (EDT) (envelope-from avd@avd.garsib.ru) Received: (from uucp@localhost) by ns.gcom.ru (8.6.10/8.6.10) id MAA05274; Fri, 16 Oct 1998 12:09:42 +0600 Received: from avd.garsib.ru(194.135.7.80) via SMTP by Garant-Siberia-PostOffice.gcom.ru, id smtpd005272; Fri Oct 16 13:09:33 1998 Received: (from avd@localhost) by avd.garsib.ru (8.8.8/8.8.8) id NAA02100; Fri, 16 Oct 1998 13:20:34 +0700 (NSS) (envelope-from avd) To: pgsql-interfaces@postgresql.org, peter@retep.org.uk Subject: JDBC date problem From: Aleksey Demakov Date: 16 Oct 1998 13:20:29 +0700 Message-ID: <87u315m3ip.fsf@avd.garsib.ru> Lines: 20 X-Mailer: Gnus v5.5/Emacs 20.2 Can you believe me? I have a table with a column which is to store the dates each row was created. I fill it with the line: insert_stmt.setDate(2, new Date (System.currentTimeMillis ())); And every day I insert a new row I can see that I did it tomorrow! I have found that in the method PreparedStatement.setDate() the date argument is intentionally incremented by one. The comments there say that it's to compensate broken SimpleDateFormat. Apparently, my SimpleDateFormat is ok (JDK 1.1.7 for win95/nt and jdk1.1.5 for freebsd). Aleksey -- Aleksey Demakov avd@gcom.ru