throw new CalendricalException("Invalid time zone ID: " + ex.toString(), ex);
}
} else {
int pos = zoneID.indexOf(':');
ZoneRulesGroup group;
if (pos >= 0) {
group = ZoneRulesGroup.getGroup(zoneID.substring(0, pos)); // validates ID
zoneID = zoneID.substring(pos + 1);
} else {
group = ZoneRulesGroup.getGroup("TZDB"); // validates ID
}
pos = zoneID.indexOf('#');
String versionID = "";
if (pos >= 0) {
versionID = zoneID.substring(pos + 1);
zoneID = zoneID.substring(0, pos);
}
ZoneRules rules = group.getRules(zoneID, versionID); // validates IDs
return new TimeZone(group.getID(), zoneID, versionID, rules);
}
}