title: Getting UTC time with Calendar and Date
body: <p>I'm trying to get an instance of Date with UTC time using the following code:</p>
  
  <pre><code>Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
  Date now = cal.getTime();
  </code></pre>
  
  <p>that looks so simple, but if I check the values at IntelliJ's debugger, I get different dates for <code>cal</code> and <code>now</code>:</p>
  
  <p><code>cal</code>:java.util.GregorianCalendar[time=1405690214219,areFieldsSet=true,lenient=true,zone=GMT,firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=6,WEEK_OF_YEAR=29,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=199,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=1,<strong>HOUR_OF_DAY=13</strong>,MINUTE=30,SECOND=14,MILLISECOND=219,ZONE_OFFSET=0,DST_OFFSET=0]</p>
  
  <p><code>now</code>:Fri Jul 18 10:30:14 BRT 2014</p>
  
  <p>as you can see, <code>cal</code> is 3 hours ahead of <code>now</code>... what am I doing wrong?</p>
  
  <p>Thanks in advance.</p>
  
  <p>[EDIT] Looks like <code>TimeZone.setDefault(TimeZone.getTimeZone("UTC"));</code> before the code above does the job...</p>