diff options
Diffstat (limited to 'test/sun/util')
-rw-r--r-- | test/sun/util/calendar/zi/Zoneinfo.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/sun/util/calendar/zi/Zoneinfo.java b/test/sun/util/calendar/zi/Zoneinfo.java index 277c045a2..9e4865518 100644 --- a/test/sun/util/calendar/zi/Zoneinfo.java +++ b/test/sun/util/calendar/zi/Zoneinfo.java @@ -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) { |