On Mon, Jul 30, 2001 at 09:24:08AM -0700, Felix Munoz wrote:
> All:
> 
> I am using this code to set the modification time field of an EJB:
> 
> Person person = personHome.findByPrimaryKey(personPK);
> .
> .
> .
> if (modified)
> {
>     Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
>     Date currentTime = calendar.getTime();
>     person.setLastModificationTime(currentTime);
> }
> 
> When presenting the "lastModificationTime" field in a JSP right after
> setting it, this value is written with the correct hour, minute, and second
> values (e.g. 07/30/01 10:56:32 AM). However, if I restart the server (i.e.
> clear the objects and re-create them from the DB), the
> "lastModificationTime" field will be written with hour, minute and second
> set to 0 (e.g. 07/30/01 00:00:00 AM).

Check you jaws mapping, I had a similiar problem with postgresql, because
jaws mapped java.util.Date to SQL type "DATA" and not "TIMESTAMP". After the
change to "TIMESTAMP" it worked for me!

-billy.

-- 
Philipp Meier                              o-matic GmbH
Gesch�ftsf�hrer                  Pfarrer-Wei�-Weg 16-18
Tel.: +49-(0)700-66284236                     89077 Ulm

PGP signature

Reply via email to