You're right, there is something wrong with Item.lastModified(). I have not
used that method before, but the simple test code below always returns the
current date instead of the contents of the last_modified field in the
database. It's not obvious whose fault it is - timestamp is a relatively
new type for PostgreSQL, especially timestamp without timezone like we're
using for last_modified.
I'm not sure where the bug is - it could be Postgres, the JDBC driver, or
our code. It may take some time to track this one down. Please stay tuned.
simple test code:
public static void main(String  args)
Context c = new Context();
Item i = Item.find( c, 13 ); // correct last_modifed value is
15-may-2003 in my database
java.util.Date d1 = i.getLastModified();
System.out.println( d1 );
From: Sanne de Roever [mailto:sanne@...]
Sent: Tuesday, July 08, 2003 5:23 PM
Subject: [Dspace-tech] lastmodified date
I'm trying to export dspace items to other systems according to their last
modification date using the item class. The lastModified date only gives
back the current time it seems, while in the item sql table reasonable dates
Any hint on how this works?
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
DSpace-tech mailing list