United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 4848242 MET timezone is misinterpreted for locale 'de' and others
4848242 : MET timezone is misinterpreted for locale 'de' and others

Details
Type:
Bug
Submit Date:
2003-04-14
Status:
Resolved
Updated Date:
2004-03-29
Project Name:
JDK
Resolved Date:
2004-03-29
Component:
globalization
OS:
solaris_8
Sub-Component:
translation
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
5.0

Related Reports
Relates:

Sub Tasks

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) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta
tiger-beta2

INTEGRATED IN:
tiger-b45
tiger-beta2


                                     
2004-06-14
EVALUATION

The MET time zone definition has been changed as a result of full support of the Olson public source. See 4495052. The localized display names must follow the root bundle definition.
###@###.### 2003-04-15


We will fix locale data bugs in tiger. 
###@###.### 2003-04-15

###@###.### 2003-11-03
******** l10n evaluation template - begin ***********

Evaluation :
Looks like all of our FIGSS locales are using IRT (Iran Standard Time) for MET. Changing this to "Middle Europe Time" to match DateFormatZoneData.java

sccsdiff info (e.g. sccs diffs -r1.30 1.31 Activator_fr.java):
 sccs diffs `sccs tell`

------- DateFormatZoneData_de.java -------
505c505,506
< 	    {"MET", IRT},
---
> 	    {"MET", new String[] {"Mitteleurop\u00e4ische Zeit", "MET",
> 				  "Mitteeurop\u00e4ische Sommerzeit", "MEST"}},


------- DateFormatZoneData_es.java -------
505c505,506
< 	    {"MET", IRT},
---
> 	    {"MET", new String[] {"Hora de Europeo Medio", "MET",
> 				  "Hora de verano de Europeo Medio", "MEST"}},

------- DateFormatZoneData_fr.java -------
505c505,506
< 	    {"MET", IRT},
---
> 	    {"MET", new String[] {"Heure d'Europe Moyenne", "MET",
> 				  "Heure d'\u00e9t\u00e9 d'Europe Moyenne", "MEST"}},

------- DateFormatZoneData_it.java -------
505c505,506
< 	    {"MET", IRT},
---
> 	    {"MET", new String[] {"Ora Europa centrale", "MET",
> 				  "Ora estiva Europa centrale", "MEST"}},,

------- DateFormatZoneData_sv.java -------
505c505,506
< 	    {"MET", IRT},
---
> 	    {"MET", new String[] {"Medeleuropeisk tid", "MET",
> 				  "Medeleuropeisk sommartid", "MEST"}},

List file(s) to be delivered :
src/share/classes/sun/text/resources/DateFormatZoneData_de.java
src/share/classes/sun/text/resources/DateFormatZoneData_es.java
src/share/classes/sun/text/resources/DateFormatZoneData_fr.java
src/share/classes/sun/text/resources/DateFormatZoneData_it.java
src/share/classes/sun/text/resources/DateFormatZoneData_sv.java

Target Build : 
Tiger-beta

Additional Info :


******** l10n evaluation template - end***********
                                     
2004-06-11



Hardware and Software, Engineered to Work Together