javaandroidjava-calendar

getActualMinimum with HOUR as argument of Calendar returns 12 in Java


I'm trying to set the time of the calendar by calling the method calendar.set(Calendar.HOUR, calendar.getActualMinimum(Calendar.HOUR)); But getActualMinimum(Calendar.HOUR) returns 12 instead of 0.


Solution

  • Try using Calendar.HOUR_OF_DAY .