ICU-10281 Fixed a VTIMEZONE writer problem that may produce overlapping rules.
X-SVN-Rev: 34025
This commit is contained in:
parent
6c56141d57
commit
78a74d6171
@ -1424,8 +1424,15 @@ public class VTimeZone extends BasicTimeZone {
|
||||
// Not equivalent rule - write out two different rules
|
||||
writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
|
||||
dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime);
|
||||
writeFinalRule(w, true, finalDstRule,
|
||||
dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, dstStartTime);
|
||||
|
||||
Date nextStart = finalDstRule.getNextStart(dstUntilTime,
|
||||
dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, false);
|
||||
|
||||
assert nextStart != null;
|
||||
if (nextStart != null) {
|
||||
writeFinalRule(w, true, finalDstRule,
|
||||
dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, nextStart.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1452,8 +1459,16 @@ public class VTimeZone extends BasicTimeZone {
|
||||
// Not equivalent rule - write out two different rules
|
||||
writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
|
||||
stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime);
|
||||
writeFinalRule(w, false, finalStdRule,
|
||||
stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, stdStartTime);
|
||||
|
||||
Date nextStart = finalStdRule.getNextStart(stdUntilTime,
|
||||
stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, false);
|
||||
|
||||
assert nextStart != null;
|
||||
if (nextStart != null) {
|
||||
writeFinalRule(w, false, finalStdRule,
|
||||
stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, nextStart.getTime());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user