aboutsummaryrefslogtreecommitdiff
path: root/test/sun/util
diff options
context:
space:
mode:
authoraefimov <none@none>2014-03-14 15:50:20 +0400
committeraefimov <none@none>2014-03-14 15:50:20 +0400
commit416a16df40b4646f0f183812b76dc008bd05adb4 (patch)
tree059c0e0ae10798c944f004bc2729a28f5a71cbc5 /test/sun/util
parent860b6d64a20b058c38bfb891b9785d4f478a565a (diff)
8037180: [TEST_BUG] test/sun/util/calendar/zi/Zoneinfo.java incorrectly calculates raw GMT offset change time
Reviewed-by: coffeys, okutsu
Diffstat (limited to 'test/sun/util')
-rw-r--r--test/sun/util/calendar/zi/Zoneinfo.java6
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) {