Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8180591

Timezone displayname is incorrect for some Timezone ID

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 9
    • core-libs

      Steps:
      Test Timezone display name consistency between CLDR and Java.
      Found some timezone ID's display name are incorrect by Java API.

      For example, running below code:
      public void TZDisplayName() {
              String tag = "en";
              Locale target = Locale.forLanguageTag(tag);
              Locale.setDefault(target);
              TimeZone testTZ = TimeZone.getTimeZone("Pacific/Bougainville");
              TimeZone.setDefault(testTZ);
              String displayName = testTZ.getDisplayName();
              System.out.println("tz displayname:" + displayName);
          }

      The output of Java is "New Zealand Standard Time". But I checked CLDR en.xml, the display name should be "Papua New Guinea Time".

      The same issue happens on tzid "Asia/Srednekolymsk"

            naoto Naoto Sato
            yzhou Daisy Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: