I am trying to clear the HOUR_OF_DAY
from the Calendar in Java. For every other field, the value is getting cleared. Only for HOUR_OF_DAY
it is not.
Calendar c = Calendar.getInstance();
c.clear(Calendar.MINUTE);
c.clear(Calendar.HOUR_OF_DAY);
System.out.println(c.getTime());
prints Wed May 04 12:00:31 IST 2016
at 2 PM
it prints Wed May 04 14:00:31 IST 2016