-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Issues with java.sql.Timestamp to "TIMESTAMP WITH TIMEZ
PostPosted: Fri Jan 26, 2007 5:31 pm 
Regular
Regular

Joined: Mon Aug 07, 2006 6:22 pm
Posts: 67
Hibernate 3.0.5, JDK 1.4.2.

I defined several Oracle columns TIMESTAMP, and I'm mapping them to java.sql.Timestamp with Hibernate. After I got the application going, I realized that I probably should have defined the columns as TIMESTAMP WITH TIMEZONE. In some situations, I'm writing to the table and reading from it in a different timezone (I know which tables that's happening in).

If I make this database change (and data conversion), do I have to do anything to my Hibernate mapping so the following scenario works?

* From the Pacific timezone, write a timestamp value equivalent to "8:00 AM PST" into the column.
* From the Central timezone, read the value from the database and see that it is "10:00 AM CST".


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.