title: How to set time to 24 hour format in Calendar
body: <p>I need to set the time on the current date. The time string is always in 24 hour format but the result I get is wrong:</p>
  
  <pre><code>  SimpleDateFormat df = new SimpleDateFormat("kk:mm");
    Date d1 = df.parse("10:30");
    Calendar c1 = Calendar.getInstance();
    c1.set(Calendar.HOUR, d1.getHours());
    c1.set(Calendar.MINUTE, d1.getMinutes());
  </code></pre>
  
  <p>The date should be today's date and the time set to 10:30. Instead the time in c1 ends up being 22:30. How can I force the calendar control to recognize my time is 24 hour format?</p>
  
  <p><strong>EDIT:</strong>
  If I just do this:</p>
  
  <pre><code>Calendar c1 = Calendar.getInstance();
  c1.set(Calendar.HOUR, 10);
  c1.set(Calendar.MINUTE, 30);
  </code></pre>
  
  <p>This gives me the same result. Why?</p>