]> granicus.if.org Git - icu/commitdiff
ICU-10898 tzdata2014f updates to ICU4J
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 11 Aug 2014 21:11:48 +0000 (21:11 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 11 Aug 2014 21:11:48 +0000 (21:11 +0000)
X-SVN-Rev: 36139

icu4j/main/shared/data/icutzdata.jar
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java

index 5d693364fedd039f82115bf02bfa307517dee85e..51a35e2031527d7a2843361b5d0d878cf86669cb 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:d3137adf135a24c2bb8f5fcbbbdea86e07a79f3eb8f4dab3734e88afa7a2dc7a
-size 91046
+oid sha256:b7a225ee1ed42c0dab0082b046e3be1b2f81d49d866bacd3115aa0b7627b7e4d
+size 90848
index 939e3daae50612fc5cee9a7723704669a8687dce..5e878a201e97393f10297d309555005c253717ee 100644 (file)
@@ -860,8 +860,8 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
         { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "India Standard Time", "Asia/Calcutta" },
 
         // Proper CLDR primary zone support #9733
-        { "en", "Asia/Shanghai", "2013-01-01T00:00:00Z", "VVVV", "China Time", "Asia/Shanghai" },
-        { "en", "Asia/Harbin", "2013-01-01T00:00:00Z", "VVVV", "Harbin Time", "Asia/Harbin" },
+        { "en", "America/Santiago", "2013-01-01T00:00:00Z", "VVVV", "Chile Time", "America/Santiago" },
+        { "en", "Pacific/Easter", "2013-01-01T00:00:00Z", "VVVV", "Easter Time", "Pacific/Easter" },
 
         // ==========
 
@@ -1073,10 +1073,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
         { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v", "\u5370\u5ea6\u65f6\u95f4", "Asia/Calcutta" },
         { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv", "\u5370\u5EA6\u65f6\u95f4", "Asia/Calcutta" },
 
-        // Proper CLDR primary zone support #9733
-        { "zh", "Asia/Shanghai", "2013-01-01T00:00:00Z", "VVVV", "\u4e2d\u56fd\u65f6\u95f4", "Asia/Shanghai" },
-        { "zh", "Asia/Harbin", "2013-01-01T00:00:00Z", "VVVV", "\u54c8\u5c14\u6ee8\u65f6\u95f4", "Asia/Harbin" },
-
         // ==========
 
         { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
@@ -3707,7 +3703,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
         GregorianCalendar gcal = new GregorianCalendar(tz);
 
         gcal.clear();
-        gcal.set(1910, Calendar.JANUARY, 1, 12, 00);    // offset 8:05:57
+        gcal.set(1900, Calendar.JANUARY, 1, 12, 00);    // offset 8:05:43
         d1 = gcal.getTime();
 
         gcal.clear();
@@ -3717,7 +3713,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
         gcal.clear();
         gcal.set(1970, Calendar.JANUARY, 1, 12, 00);
         dexp2 = gcal.getTime();
-        dexp1 = new Date(dexp2.getTime() - (5*60 + 57)*1000);   // subtract 5m57s
+        dexp1 = new Date(dexp2.getTime() - (5*60 + 43)*1000);   // subtract 5m43s
 
         DateFormat fmt = DateFormat.getTimeInstance(DateFormat.FULL, new ULocale("zh"));
         fmt.setTimeZone(tz);
index a1114076d63b119f9d67269acf20765f2dbb8fb9..545b59974b8d43dd68479e05717edd6426334df4 100644 (file)
@@ -398,6 +398,11 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
                         }
                     }
 
+                    if (id.equals("Pacific/Apia") && PATTERNS[patidx].equals("vvvv")
+                            && logKnownIssue("11052", "Ambiguous zone name - Samoa Time")) {
+                        continue;
+                    }
+
                     BasicTimeZone btz = (BasicTimeZone)TimeZone.getTimeZone(id, TimeZone.TIMEZONE_ICU);
                     TimeZone tz = TimeZone.getTimeZone(id);
                     sdf.setTimeZone(tz);
@@ -458,7 +463,8 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
                                         .append(", time=").append(testTimes[testidx])
                                         .append(", restime=").append(restime)
                                         .append(", diff=").append(timeDiff);
-                                    if (expectedRoundTrip[testidx]) {
+                                    if (expectedRoundTrip[testidx]
+                                            && !isSpecialTimeRoundTripCase(LOCALES[locidx], id, PATTERNS[patidx], testTimes[testidx])) {
                                         errln("FAIL: " + msg.toString());
                                     } else if (REALLY_VERBOSE_LOG) {
                                         logln(msg.toString());
@@ -497,6 +503,31 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
         logln("Iteration: " + testCounts);
     }
 
+    // Special exclusions in TestTimeZoneRoundTrip.
+    // These special cases do not round trip time as designed.
+    private boolean isSpecialTimeRoundTripCase(ULocale loc, String id, String pattern, long time) {
+        final Object[][] EXCLUSIONS = {
+            {null, "Asia/Chita", "zzzz", Long.valueOf(1414252800000L)},
+            {null, "Asia/Chita", "vvvv", Long.valueOf(1414252800000L)},
+            {null, "Asia/Srednekolymsk", "zzzz", Long.valueOf(1414241999999L)},
+            {null, "Asia/Srednekolymsk", "vvvv", Long.valueOf(1414241999999L)},
+        };
+        boolean isExcluded = false;
+        for (Object[] excl : EXCLUSIONS) {
+            if (excl[0] == null || loc.equals((ULocale)excl[0])) {
+                if (id.equals(excl[1])) {
+                    if (excl[2] == null || pattern.equals((String)excl[2])) {
+                        if (excl[3] == null || ((Long)excl[3]).compareTo(time) == 0) {
+                            isExcluded = true;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        return isExcluded;
+    }
+
     public void TestParse() {
         final Object[][] DATA = {
         //   text                   inpos       locale      style
index 1982471b1589cced8a7fc742eee904b2c44d0ac5..ea6d21a3a5d6ad45d17001367d40ba5bfd7ab827 100644 (file)
@@ -1475,7 +1475,16 @@ public class TimeZoneTest extends TestFmwk
         // Some canonical IDs in CLDR are defined as "Link"
         // in Olson tzdata.
         final String[][] excluded1 = {
+                {"Africa/Bamako", "Africa/Abidjan"},
+                {"Africa/Banjul", "Africa/Abidjan"},
+                {"Africa/Conakry", "Africa/Abidjan"},
+                {"Africa/Dakar", "Africa/Abidjan"},
+                {"Africa/Freetown", "Africa/Abidjan"},
                 {"Africa/Khartoum", "Africa/Juba"},
+                {"Africa/Lome", "Africa/Abidjan"},
+                {"Africa/Nouakchott", "Africa/Abidjan"},
+                {"Africa/Ouagadougou", "Africa/Abidjan"},
+                {"Africa/Sao_Tome", "Africa/Abidjan"},
                 {"America/Shiprock", "America/Denver"}, // America/Shiprock is defined as a Link to America/Denver in tzdata
                 {"America/Kralendijk", "America/Curacao"},
                 {"America/Lower_Princes", "America/Curacao"},
@@ -1499,6 +1508,7 @@ public class TimeZoneTest extends TestFmwk
                 {"America/Lower_Princes", "America/Aruba"},
                 {"Antarctica/South_Pole", "Antarctica/McMurdo"},
                 {"Atlantic/Jan_Mayen", "Europe/Oslo"},
+                {"Atlantic/St_Helena", "Africa/Abidjan"},
                 {"Arctic/Longyearbyen", "Europe/Oslo"},
                 {"Europe/Busingen", "Europe/Zurich"},
                 {"Europe/Guernsey", "Europe/London"},