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

MET timezone is misinterpreted for locale 'de' and others

    Details

    • Subcomponent:
    • Resolved In Build:
      b45
    • CPU:
      sparc
    • OS:
      solaris_8

      Description



      Name: jl125535 Date: 04/14/2003


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

      SunOS bla 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-
      100


      A DESCRIPTION OF THE PROBLEM :

      Setting the locale to 'de' misinterprets time zone 'MET' as
      'Middle Eastern Time' instead of 'Middle European Time'.

      This can be seen by getting the DateFormatSymbols for this
      locale and displaying them (see the source code).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the code given below and execute:
      java LocaleTest | grep MET

      You get:
       MET Iranische Zeit IRT Iranische Sommerzeit IRST

      If you use locale "en" instead you get:
       MET Middle Europe Time MET Middle Europe Summer Time MEST

      This is an old bug, that only been fixed for certain
      locales. For instance, this bug exists for all Spanish
      locales.




      EXPECTED VERSUS ACTUAL BEHAVIOR :
      See 'Steps to Reproduce'

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      LocaleTest.java:


      import java.text.DateFormatSymbols;
      import java.util.Locale;

      public class LocaleTest {
        public static void main(String[] args) {
          DateFormatSymbols symbols = new DateFormatSymbols( new Locale( "de" ) );
          String[][] zoneStrings = symbols.getZoneStrings();
          for (int count = 0; count < zoneStrings.length; count++) {
            System.out.println("");
            for (int index = 0; index < zoneStrings[count].length; index++) {
              if (zoneStrings[count][index].startsWith(" MET") {
                System.out.print(" " + zoneStrings[count][index]);
              }
            }
          }
        }
      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :

      May be setting the TZ to 'CET'.
      (Review ID: 179740)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcolfersunw Kieran Colfer (Inactive)
                Reporter:
                jleesunw Jon Lee (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: