# HG changeset patch # User aefimov # Date 1394797820 -14400 # Node ID 30ea1ad58166eceee10ffda2decb3b96ffeb486c # Parent c6aac3e0bc8fce9bcc8ebbc1b88799575b1963f9 8037180: [TEST_BUG] test/sun/util/calendar/zi/Zoneinfo.java incorrectly calculates raw GMT offset change time Reviewed-by: coffeys, okutsu diff -r c6aac3e0bc8f -r 30ea1ad58166 jdk/test/sun/util/calendar/zi/Zoneinfo.java --- a/jdk/test/sun/util/calendar/zi/Zoneinfo.java Fri Mar 14 15:49:46 2014 +0400 +++ b/jdk/test/sun/util/calendar/zi/Zoneinfo.java Fri Mar 14 15:50:20 2014 +0400 @@ -372,6 +372,7 @@ 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 @@ 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) {