• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hybernate PersistenDateTime off one day ?

 
Grace Green
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a hybernate entity mapped to a specific table that have a Date type column, DATE_ASSIGNED.
Here below is how I have represented that field in the hybernate entity:



The value in the table is 15-Feb-2011, but on the screen that uses that hybernate entity I see 14-Feb-2011.
Could you please help me figure out why ?

Thank you
 
Chris Pheby
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am the maintainer of Jadira Usertype so hopefully I can help solve your issue.

The likelihood is that you are in a different timezone from your database. Out of the box the time is written down using UTC, but rendered in your JVM timezone.

Take a look at:

https://forum.hibernate.org/viewtopic.php?f=1&t=1010067

Regards Chris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic