]> granicus.if.org Git - icu/commitdiff
ICU-13552 tzdata2018b updates to ICU trunk. Also fixed a few issues in the test code...
authorYoshito Umaoka <y.umaoka@gmail.com>
Wed, 24 Jan 2018 01:37:07 +0000 (01:37 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Wed, 24 Jan 2018 01:37:07 +0000 (01:37 +0000)
X-SVN-Rev: 40794

icu4c/source/data/misc/zoneinfo64.txt
icu4c/source/tools/tzcode/Makefile.in
icu4c/source/tools/tzcode/icuzdump.cpp
icu4c/source/tools/tzcode/icuzones
icu4c/source/tools/tzcode/tz2icu.cpp
icu4j/main/shared/data/icudata.jar
icu4j/main/shared/data/icutzdata.jar

index f4ece0a8ac6f1a58db53a582f7039e9a1cd8ee84..c64e2f1473a8ad559d2754b8356517771be4e81a 100644 (file)
@@ -3,9 +3,9 @@
 // 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   << !!! <<
@@ -13,7 +13,7 @@
 //---------------------------------------------------------
 
 zoneinfo64:table(nofallback) {
- TZVersion { "2018a" }
+ TZVersion { "2018b" }
  Zones:array { 
   /* ACT */ :int { 354 } //Z#0
   /* AET */ :int { 366 } //Z#1
index f8ab02d6ed51594772df2b4db98ad820b0d890f2..63c9230086ee3d616562e162b69a0b259b83b144 100644 (file)
@@ -77,12 +77,12 @@ tzorig:     $(TZCODE) $(TZDATA)
        -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)
 
index 3e5ed1debb0b48a501686bb3aee87cb63a2f685c..71551ed8d9aacec2c42d56ee8ecfe16cae219c2d 100644 (file)
@@ -40,6 +40,7 @@
 #include "uoptions.h"
 
 using namespace std;
+using namespace icu;
 
 class DumpFormatter {
 public:
index 8596bda64a90389cfe483a16d5cd5b92d86b1a5c..841c5f827ca93cef400d45523ee94d6ec987d2b3 100644 (file)
@@ -109,3 +109,6 @@ Zone        Europe/Dublin--ICU      -0:25:00 -      LMT     1880 Aug  2
                         0:00   -       GMT     1948 Apr 18  2:00s
                         0:00   GB-Eire GMT/IST 1968 Oct 27
                         0:00   Eire--ICU       GMT/IST
+
+Link Europe/Dublin--ICU Eire--ICU
+
index dff31949bad3b41ee2c7a84cedfba81ab8405640..b946ffb2c9db9f236b69c7beaf1ebad9143ea4a1 100644 (file)
@@ -903,7 +903,6 @@ map<string,FinalRule> finalRules;
 
 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
@@ -975,9 +974,6 @@ void readFinalZonesAndRules(istream& in) {
 
             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 {
@@ -1508,7 +1504,7 @@ int main(int argc, char *argv[]) {
     // 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;
@@ -1516,10 +1512,14 @@ int main(int argc, char *argv[]) {
         }
     }
 
+    //
+    // 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);
@@ -1544,6 +1544,30 @@ int main(int argc, char *argv[]) {
         }
     }
 
+    // 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) {
@@ -1561,7 +1585,7 @@ int main(int argc, char *argv[]) {
         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;
         }
index 80a22884f44446c63dca27bdb75bcfbc37da25aa..795187b09e703fdf2051dd9afc2945a1188555d1 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:c49eab66e938bbddc61cd4f5ec09800f8c7546f6496c4c62336869ce0a5f6e3e
+oid sha256:0b25843386b6a46ffb45b9d4dc4694cf84f183bf995ea8579653b6420e1ea3c9
 size 12475727
index 8b2841bb38f1a04d69010131f91dd8e419c8f13b..2c2b0acaf0e4f67a3a60ccdd7880d5c908ca98c6 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3c4cf7289cb6a71d2357cb1ba961f5ef499759a9eebe6d4d72c97874dcfbd162
-size 92804
+oid sha256:2747db532b79bf23a4cab51918391b24a8d873a751a44852485882785f53057c
+size 92805