title: JVM and timezones
body: <p>I'm having an issue with java timezones, if anyone can help me. </p>
  
  <p>I have a web application running on tomcat 5.5 (not sure if this is relevant), with the following JVM version</p>
  
  <pre><code>[someuser@webserver bin]$ java -version
  java version "1.5.0_06"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
  Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
  [someuser@webserver bin]$
  </code></pre>
  
  <p>The system date is, say -</p>
  
  <pre><code>[someuser@webserver bin]$ date
  Mon Aug 15 09:09:46 EST 2011
  </code></pre>
  
  <p>Within the web application, I make a call at a certain point to <code>Calendar.getInstance().getTime()</code>, and I print this timestamp in the logs.</p>
  
  <p>Problem is that this timestamp gets returned in EDT, although server's time is in EST. For this reason, the date returned is 1h later than it should.</p>
  
  <p>What I want to achieve is make <code>Calendar.getInstance().getTime()</code> to return a date in the same timezone as the system.</p>
  
  <p>I have searched the forums, and found some suggestions that the jvm is not reading correctly the system's timezone.
  I have tried starting the tomcat with <code>-Duser.timezone=EST</code> parameter, but the system keeps returning timestamps in the EDT timezone. Please note - trying <code>-Duser.timezone</code> with a non-est parameter seems to work.
  The problems seems to be of a different nature.</p>
  
  <p>My issue is somehow similar with <a href="https://stackoverflow.com/questions/3933368/java-timezone-issue-edt-vs-est">this SO question</a>. However, I'm only trying to get the date in the same timezone as the system is in, without any special handling.</p>
  
  <p>Are you able to help?</p>