title: Date stored with Local Time Zone - Hibernate JPA
body: <p>I have seen a number of threads related to the issue I have, but I couldn't figure out a way to resolve mine,</p>
  
  <p>I have an attribute in an Entity of type Date. It's definition goes likes this,</p>
  
  <pre><code>@Column(name="CREATION_DATETIME")
  @Temporal(TemporalType.TIMESTAMP)
  private Date creationDateTime
  </code></pre>
  
  <p>When I print the date value, it is in local time zone, which is acceptable because the toString() in Date uses the default time zone ; which will be the time zone where the program is running. when stored in database it is storing the local time zone value; but I want it to be stored the original value without any timezone conversion. Hibernate handles the persistence here.  why is this happening and how could it be resolved.? </p>
  
  <p>Showing an example here to make my issue clear the date 2011-11-30T19:02:00+0000 is stored as 30-NOV-11 01.02.00.000000000 PM. the local time zone is CST, so it does the -0600 and stores it.</p>
  
  <p>thanks
  Sanjay</p>