title: Get GMT Time in Java
body: <p>In Java, I want to get the current time in GMT.</p>
  
  <p>I tried various options like this:</p>
  
  <pre><code>Date date = new Date();
  Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
  date1 = calendar.getTime();
  </code></pre>
  
  <p>But the date is always is interpreted in my local time zone.</p>
  
  <p>What am I doing wrong and how can I convert a java Date to GMT?</p>