-->
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.  [ 3 posts ] 
Author Message
 Post subject: Converting an Oracle Date field as a Date object
PostPosted: Thu Dec 06, 2007 6:21 pm 
Newbie

Joined: Thu Dec 06, 2007 6:14 pm
Posts: 2
Hibernate version: 3

Name and version of the database you are using: Oracle 9i

Hi, I'm trying to pull a Date column from an Oracle db and store it as a Date object.

It appears to be storing the correct date and time, but the timezone is not being set, instead it's using the timezone of the server, so it appears to be 6 hours ahead with my timezone.

I would like to be able to set the timezone, so that I can format the date, setting the timezone with the actual timezone that i want.

Can someone help to explain how to put the actual timezone from the Date column into the Date object?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 6:04 pm 
Newbie

Joined: Thu Dec 06, 2007 6:14 pm
Posts: 2
Does anybody know the answer to this?

Is there a way to set a default time zone on the column in my hbm.xml file?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 6:29 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
Shazaam wrote:
Does anybody know the answer to this?

Is there a way to set a default time zone on the column in my hbm.xml file?


This might not be what you are looking for but have you considered setting your JVM's time zone?


Farzad-


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

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.