提交 464b0ee8 编写于 作者: A aefimov

8037180: [TEST_BUG] test/sun/util/calendar/zi/Zoneinfo.java incorrectly...

8037180: [TEST_BUG] test/sun/util/calendar/zi/Zoneinfo.java incorrectly calculates raw GMT offset change time
Reviewed-by: coffeys, okutsu
上级 c6ba9e51
......@@ -372,6 +372,7 @@ class Zoneinfo {
ZoneRec zrec = zone.get(zone.size()-1);
tz.getOffsetIndex(zrec.getGmtOffset());
int lastGmtOffsetValue = -1;
int currentSave = 0;
boolean usedZone;
for (int zindex = 0; zindex < zone.size(); zindex++) {
......@@ -380,9 +381,12 @@ class Zoneinfo {
gmtOffset = zrec.getGmtOffset();
int stdOffset = zrec.getDirectSave();
if (gmtOffset != lastGmtOffsetValue) {
tz.setRawOffset(gmtOffset, fromTime);
lastGmtOffsetValue = gmtOffset;
}
// If this is the last zone record, take the last rule info.
if (!zrec.hasUntil()) {
tz.setRawOffset(gmtOffset, fromTime);
if (zrec.hasRuleReference()) {
tz.setLastRules(zrec.getRuleRef().getLastRules());
} else if (stdOffset != 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册