-->
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: Timezone conversion in @Version
PostPosted: Wed Jul 22, 2009 7:04 am 
Newbie

Joined: Tue Jul 21, 2009 2:56 am
Posts: 1
I have an application which uses @Version annotation (on last update timestamp of record) on entity objects to maintain data integrity. The application works well...until there comes an requirement that the application needs to process from multiple countries. To support such requirement, it is needed to log country specific last update time for records.

E.g. current application time is 20:00:00 GMT+4, the request is from UK, which is of timezone GMT+0. For this UK request, we need to log record last update time as 16:00:00 GMT+0.

My question is, how can I do to convert the record last update time based on a specific timezone when I'm using @Version annotation?

My gut feeling is that I can add some conversion logic into lisenters or interceptors before record is flushed. But later I found that the 'version' is maintained in EntityEntry which I can not make any changes.

Can anyone give me some advices or directions to achive that?


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.