// License & terms of use: http://www.unicode.org/copyright.html#License
//---------------------------------------------------------
// Build tool: tz2icu
-// Build date: Thu Jan 18 04:48:22 2018
+// Build date: Tue Jan 23 18:02:21 2018
// tz database: ftp://ftp.iana.org/tz/
-// tz version: 2018a
+// tz version: 2018b
// ICU version: 60.1
//---------------------------------------------------------
// >> !!! >> THIS IS A MACHINE-GENERATED FILE << !!! <<
//---------------------------------------------------------
zoneinfo64:table(nofallback) {
- TZVersion { "2018a" }
+ TZVersion { "2018b" }
Zones:array {
/* ACT */ :int { 354 } //Z#0
/* AET */ :int { 366 } //Z#1
-mv $(TZORIG)/zishrink.awk $(TZORIG)/zishrink.awk.orig
sed -e '/if (line ~ \/^R SystemV \/) return/s/^/#/' $(TZORIG)/zishrink.awk.orig > $(TZORIG)/zishrink.awk
-mv $(TZORIG)/Makefile $(TZORIG)/Makefile.orig
- sed -e "s/BACKWARD=\$$(BACKWARD)/BACKWARD='\$$(BACKWARD)'/" $(TZORIG)/Makefile.orig > $(TZORIG)/Makefile
+ sed -e "s/^BACKWARD=.*/BACKWARD= backward pacificnew/" $(TZORIG)/Makefile.orig > $(TZORIG)/Makefile
$(MAKE) -C $@ $(TZORIG_OPTS) zdump zones
$(ZDUMPOUT): tzorig
( cd $(TZORIG) ; ./zdump$(EXEEXT) $(ZDUMP_OPTS) )
-
+ find $(ZDUMPOUT) -name '*--ICU' -exec sh -c 'mv "$${0}" $${0%--ICU}' {} \;
dump-out: $(ZDUMPOUT) $(ICUZDUMPOUT)
map<string, set<string> > links;
map<string, string> reverseLinks;
-map<string, string> linkSource; // id => "Olson link" or "ICU alias"
/**
* Predicate used to find FinalRule objects that do not have both
links[fromid].insert(toid);
reverseLinks[toid] = fromid;
-
- linkSource[fromid] = "Olson link";
- linkSource[toid] = "Olson link";
} else if (token.length() > 0 && token[0] == '#') {
consumeLine(in);
} else {
// Collect zone IDs to be modified with ICU definition.
vector<string> customZones;
for (ZoneMapIter i = ZONEINFO.begin(); i != ZONEINFO.end(); ++i) {
- string id = i->first;
+ const string& id = i->first;
size_t idx = id.rfind(ICU_ZONE_OVERRIDE_SUFFIX);
if (idx != string::npos && idx == id.length() - ICU_ZONE_OVERRIDE_SUFFIX_LEN) {
cout << "ICU zone override: " << id << endl;
}
}
+ //
+ // BEGIN ICU Custom ZoneInfo Override Handling
+ //
+
// Replace zoneinfo with ICU definition, then remove ICU zone ID with
// the special suffix.
- for (vector<string>::iterator i = customZones.begin(); i < customZones.end(); i++) {
- string origId = *i;
+ for (vector<string>::iterator i = customZones.begin(); i != customZones.end(); i++) {
+ string& origId = *i;
string custId = origId + ICU_ZONE_OVERRIDE_SUFFIX;
map<string,ZoneInfo>::iterator origZi = ZONEINFO.find(origId);
}
}
+ // Also remove aliases for ICU custom zoneinfo overrides.
+ for (map<string,set<string>>::const_iterator i = links.begin(); i != links.end(); ) {
+ const string& id = i->first;
+ size_t idx = id.rfind(ICU_ZONE_OVERRIDE_SUFFIX);
+ if (idx != string::npos && idx == id.length() - ICU_ZONE_OVERRIDE_SUFFIX_LEN) {
+ const set<string>& aliases = i->second;
+ // Also remove all revserse links
+ for (set<string>::const_iterator j = aliases.begin(); j != aliases.end(); j++) {
+ const string& alias = *j;
+ cout << "Removing alias " << alias << endl;
+ reverseLinks.erase(alias);
+ }
+
+ links.erase(i++);
+ } else {
+ i++;
+ }
+ }
+
+
+ //
+ // END ICU Custom ZoneInfo Override Handling
+ //
+
try {
for_each(finalZones.begin(), finalZones.end(), mergeFinalZone);
} catch (const exception& error) {
const string& olson = i->first;
const set<string>& aliases = i->second;
if (ZONEINFO.find(olson) == ZONEINFO.end()) {
- cerr << "Error: Invalid " << linkSource[olson] << " to non-existent \""
+ cerr << "Error: Invalid 'Link' to non-existent \""
<< olson << "\"" << endl;
return 1;
}