title: Getting a Date from a GregorianCalendar
body: <p>The GregorianCalendar is being inconsistent:</p>
  
  <pre><code>Calendar cal = new GregorianCalendar(2000, 0, 1);
  long testCalOne = cal.getTimeInMillis();
  cal.setTimeZone(TimeZone.getTimeZone("UTC"));
  long testCalTwo = cal.getTimeInMillis();
  
  Calendar cal2 = new GregorianCalendar(2000, 0, 1);
  cal2.setTimeZone(TimeZone.getTimeZone("UTC"));
  long testCalThree = cal2.getTimeInMillis();
  
  System.out.println(testCalOne + ", " + testCalTwo + ", " + testCalThree);
  </code></pre>
  
  <p>Results in</p>
  
  <pre><code>946681200000, 946681200000, 946684800000
  </code></pre>
  
  <p>This represents 2000-01-01 midnight in GMT+1, GMT+1 and UTC respectively. My timezone is +1 hour relative to UTC.</p>
  
  <p>The problem here is that the getTimeInMillis is supposed to return the amount of milliseconds since 1970-01-01 in UTC. Only testCalThree is correct.</p>
  
  <p>Another problem is that setTimeZone is seemingly not working depending on whether I called getTimeInMillis before.</p>
  
  <p>My goal is to take a Calendar I receive as parameter from other code and get a UTC (java.util) Date for further use.</p>