final List itemList = formatParser.set(pattern).getItems();
boolean changed = false;
for (int i = 0; i < itemList.size(); ++i) {
Object item = itemList.get(i);
if (item instanceof VariableField) {
VariableField variableField = (VariableField) item;
if (variableField.getType() == DateTimePatternGenerator.ZONE) {
if (!variableField.toString().equals(newZone)) {
changed = true;
itemList.set(i, new VariableField(newZone, true));
}
}
}
}
return changed ? formatParser.toString() : pattern;