title: How to add/subtract TimeZone Offset to a Timestamp in Java?
body: <p>I am using JDK 8 and I played with <code>ZonedDateTime</code> and <code>Timestamp</code> a lot. But still I am not able to get a solution for the problem I am facing.</p>
  
  <p>Lets say I get a formatted <code>Timestamp</code> in GMT (UTC) and my server is located somewhere. Lets say it's set to <code>Asia/Calcutta</code> TimeZone (whose ZoneOffset is <code>+05:30</code>).</p>
  
  <p>How to basically add/subtract my time zone offset to the Timestamp?</p>
  
  <pre><code>Input : 2017-09-13 13:10:30.333
  Output: 2017-09-13 18:40:30.333
  </code></pre>
  
  <p>Explanation : In the input, the timezone offset which is 5hrs 30mts has been added to the input. Also, the input is of type Timestamp and so is the output.</p>
  
  <p>I use <code>ZoneID.systemDefault()</code> function to retrieve the TimeZone known to JVM. In my case, the TimeZone turned out to be <code>Asia/Calcutta</code>.</p>