title: Should I store the timezone separately from the timestamp for Postgres and JDBC?
body: <p>It seems (and maybe I'm wrong) that if you want to preserve the timezone of when something happened with JDBC and Postgres you need to store the timezone separately from the timestamp.</p>
  
  <p>That is I would prefer to give my ORM/JDBC/JPA a Java <code>Calendar</code> (or Joda <code>DataTime</code>) with say timezone <code>America/New_York</code> to a Postgres <code>timestampz</code> field. AND I would expect on retrieval regardless of the Servers timezone (or defaulting to UTC) to give me back a <code>Calendar</code> with timezone <code>America/New_York</code>. But just looking at most JDBC code (and things that depend on it that doesn't happen).</p>
  
  <p><strong>Is this correct?</strong></p>
  
  <p>This seems ridiculous that I would need to store the tz in another field when postgres supports it.</p>
  
  <p>Thus it seems like the only two options are:</p>
  
  <ol>
  <li>Select the <code>timestampz</code> Postgres column as a <code>java.util.String</code> and parse it.</li>
  <li>Store the timezone as a separate field.</li>
  </ol>
  
  <p>Option number one and two one would require some sort of conversion interceptors for my SQL mapping / ORM libraries.</p>
  
  <ul>
  <li>What is the best solution for JDBC ?</li>
  <li>What is the best solution for JPA (if different than JDBC)?</li>
  </ul>