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

Timezone displayname is incorrect for some Timezone ID

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:

      Description

      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"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                yzhou Daisy Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: