< prev index next >

test/java/util/TimeZone/Bug8149452.java

Print this page

        

@@ -20,11 +20,11 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 /*
  * @test
- * @bug 8149452
+ * @bug 8149452 8151876
  * @summary Check the missing time zone names.
  */
 import java.text.DateFormatSymbols;
 import java.util.ArrayList;
 import java.util.TimeZone;

@@ -40,11 +40,14 @@
                 .getZoneStrings();
         for (String tzID : TimeZone.getAvailableIDs()) {
             if (!Arrays.stream(zoneStrings)
                     .anyMatch(zone -> tzID.equalsIgnoreCase(zone[0]))) {
                 // to ignore names for Etc/GMT[+-][0-9]+ which are not supported
-                if (!tzID.startsWith("Etc/GMT") && !tzID.startsWith("GMT")) {
+                // Also ignore the TimeZone DisplayNames with GMT[+-]:hh:mm
+                if (!tzID.startsWith("Etc/GMT")
+                        && !tzID.startsWith("GMT")
+                        && !TimeZone.getTimeZone(tzID).getDisplayName().startsWith("GMT")) {
                     listNotFound.add(tzID);
                 }
             }
         }
 
< prev index next >