title: how to store date AND time with JPA in Oracle?
body: <p>I'm using WebSphere 7 (Java EE 5) and OpenJPA 1.2.1.</p>
  
  <p>I have a JPA object with a "<code>modifiedTimestamp</code>" attribute, something like this:</p>
  
  <pre><code>@Entity
  public class Widget {
    /* ... */
    private java.sql.Date modifiedTimestamp;
    /* ... */
  }
  </code></pre>
  
  <p>The related field in the Oracle database is of type <code>DATE</code>.</p>
  
  <p>I set the date like so ...</p>
  
  <pre><code>myWidget.setModifiedTimestamp(new java.sql.Data(System.currentTimeMillis());
  </code></pre>
  
  <p>... and it gets stored, but when I read it back the time of day hasn't been stored, it allows comes back as 24:00.</p>
  
  <p>Is this a JPA thing, or an Oracle thing?  Any suggestions are greatly appreciated!</p>
  
  <p>Thanks</p>