FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
On the day of DST changes, Calendar.roll does not roll the hour 23.
However, its javadoc states that it will "add a single unit of time".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run this snippet:
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("CST"));
cal.setTimeInMillis(1457928024812l);
System.out.println(cal.getTime());
cal.roll(Calendar.HOUR_OF_DAY, true);
System.out.println(cal.getTime());
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output
Sun Mar 13 23:00:24 CDT 2016
Sun Mar 13 00:00:24 CDT 2016
ACTUAL -
Output:
Sun Mar 13 23:00:24 CDT 2016
Sun Mar 13 23:00:24 CDT 2016
REPRODUCIBILITY :
This bug can be reproduced always.