title: Ask Gregorian Calendar for hour of day in java
body: <p>I'm using a Gregorian Calendar to set a specific date and time to an application using the set function of the Gregorian Calendar.  When i use the getTime() method, it gives me the right output however when i try to access the Hour_Of_Day and Minute it gives a wrong number. </p>
  
  <pre><code>    Calendar time = new GregorianCalendar();
      time.set(2010, Calendar.JANUARY, 1, 7, 20,0);       
      hour = time.HOUR_OF_DAY;
      minute = time.MINUTE; 
  </code></pre>
  
  <p>The hour gives an output of 11 and the minute gives an a value of 12.<br>
  Any suggestions on how to fix this? 
  Thanks</p>