List<ZoneOffsetTransitionRule> lastTransitionRuleList = new ArrayList<ZoneOffsetTransitionRule>(2);
// initialize the standard offset calculation
TZWindow firstWindow = windowList.get(0);
ZoneOffset standardOffset = firstWindow.standardOffset;
Period savings = Period.ZERO;
if (firstWindow.fixedSavingAmount != null) {
savings = firstWindow.fixedSavingAmount;
}
ZoneOffset firstWallOffset = deduplicate(standardOffset.plus(savings));
OffsetDateTime windowStart = deduplicate(OffsetDateTime.dateTime(Year.MIN_YEAR, 1, 1, 0, 0, firstWallOffset));
// build the windows and rules to interesting data
for (TZWindow window : windowList) {
// tidy the state
window.tidy(windowStart.getYear());
// calculate effective savings at the start of the window
Period effectiveSavings = window.fixedSavingAmount;
if (effectiveSavings == null) {
// apply rules from this window together with the standard offset and
// savings from the last window to find the savings amount applicable
// at start of this window
effectiveSavings = Period.ZERO;