&& (currentRules[1] instanceof AnnualTimeZoneRule)
&& (currentRules[2] instanceof AnnualTimeZoneRule)) {
// A pair of AnnualTimeZoneRule
AnnualTimeZoneRule r1 = (AnnualTimeZoneRule)currentRules[1];
AnnualTimeZoneRule r2 = (AnnualTimeZoneRule)currentRules[2];
DateTimeRule start, end;
int offset1 = r1.getRawOffset() + r1.getDSTSavings();
int offset2 = r2.getRawOffset() + r2.getDSTSavings();
int sav;
if (offset1 > offset2) {
start = r1.getRule();
end = r2.getRule();
sav = offset1 - offset2;
} else {
start = r2.getRule();
end = r1.getRule();
sav = offset2 - offset1;
}
// getSimpleTimeZoneRulesNear always return rules using DOW / WALL_TIME
stz.setStartRule(start.getRuleMonth(), start.getRuleWeekInMonth(), start.getRuleDayOfWeek(),
start.getRuleMillisInDay());
stz.setEndRule(end.getRuleMonth(), end.getRuleWeekInMonth(), end.getRuleDayOfWeek(),
end.getRuleMillisInDay());
// set DST saving amount and start year
stz.setDSTSavings(sav);
} else {