-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b113
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8252072 | openjdk8u272 | Masayoshi Okutsu | P3 | Resolved | Fixed | b05 |
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.
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.
- backported by
-
JDK-8252072 (cal) Calendar.roll does not always roll the hours during daylight savings changes
- Resolved
- relates to
-
JDK-8229922 recently backported globalization tests fail on jdk8u
- Open