Thread: Invalid date in database

Invalid date in database

From
Robert.Farrugia@go.com.mt
Date:
Hi,

I noticed the following thing in postgres (7.1.x).  I have a timestamp
field which is populated by a java program using the new
java.sql.Timestamp(System.currentTimeMillis()) command so as to set the
current time when the record was edited (I know that I can use the now()
command, but this is just an example).  For most of the records, the
timestamp is correct.  But some of the records have incorrect timestamps
namely they have a second value of 60 (e.g. 2001/10/12 12:14:60.00).

This is creating problems especially when dumping/restoring as pg_dump
dumps them incorrectly (2001/10/12 12:14:60.00) and then psql refuses to
load them up.

Any comments on this ?

Regards
Robert