-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b12
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2159199 | 7 | Jenny Huang | P4 | Closed | Fixed | b80 |
JDK-2159200 | OpenJDK6 | Jiri Tusla | P4 | Resolved | Fixed | b06 |
FULL PRODUCT VERSION :
On windows:
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
On Linux:
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Linux h114155 2.4.25 #3 SMP Sun Apr 4 19:32:54 CEST 2004 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The full output of a time with DateFormat is not as expected for a German locale.
As you can see in the example, there are several problems with it. First, it doesn't add leading zeros and uses a dot instead of a colon for separating hours from minutes. While this is a format that may be used somewhere in Germany, it is not the correct one according to the significant standards.
Second, the code of the time zone is not translated. According to http://de.wikipedia.org/wiki/Zeitzone#UTC_bis_UTC.2B3 there are five time zones with a German name and acronym:
- WEZ for WET, the West European Time
- WESZ for WEST/WEDT, the West European Summer Time/Daylight Time
- MEZ for CET, the Central European Time
- MESZ for CEST/CEDT, the Central European Summer Time/Daylight Time
- OEZ for EET, the East European Time
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the provided source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output at time of execution:
00:37 Uhr MEZ
ACTUAL -
Output at time of execution:
0.37 Uhr CET
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Locale;
import java.util.Date;
public class DateFormatTest
{
public static void main(String[] args)
{
Locale l = new Locale("de", "DE");
DateFormat df = DateFormat.getTimeInstance(DateFormat.FULL, l);
System.out.println(df.format(new Date()));
}
}
---------- END SOURCE ----------
On windows:
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
On Linux:
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Linux h114155 2.4.25 #3 SMP Sun Apr 4 19:32:54 CEST 2004 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The full output of a time with DateFormat is not as expected for a German locale.
As you can see in the example, there are several problems with it. First, it doesn't add leading zeros and uses a dot instead of a colon for separating hours from minutes. While this is a format that may be used somewhere in Germany, it is not the correct one according to the significant standards.
Second, the code of the time zone is not translated. According to http://de.wikipedia.org/wiki/Zeitzone#UTC_bis_UTC.2B3 there are five time zones with a German name and acronym:
- WEZ for WET, the West European Time
- WESZ for WEST/WEDT, the West European Summer Time/Daylight Time
- MEZ for CET, the Central European Time
- MESZ for CEST/CEDT, the Central European Summer Time/Daylight Time
- OEZ for EET, the East European Time
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the provided source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output at time of execution:
00:37 Uhr MEZ
ACTUAL -
Output at time of execution:
0.37 Uhr CET
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Locale;
import java.util.Date;
public class DateFormatTest
{
public static void main(String[] args)
{
Locale l = new Locale("de", "DE");
DateFormat df = DateFormat.getTimeInstance(DateFormat.FULL, l);
System.out.println(df.format(new Date()));
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2159200 DateFormat incorrect for German locale
- Resolved
-
JDK-2159199 DateFormat incorrect for German locale
- Closed
- relates to
-
JDK-2179468 test/java/util/TimeZone/Bug6329116.java fails
- Closed
-
JDK-6652200 test/java/util/TimeZone/Bug6329116.java fails
- Resolved
-
JDK-6723554 java/util/TimeZone/Bug6329116.java failed on 1.6.0_07-rev-b07 but passed on 1.6.0_07-b06.
- Closed