jdk9 vs. jdk8 : TimeZone getDisplayName(Locale.GERMAN) for TZ=MET
Baesken, Matthias
matthias.baesken at sap.com
Wed May 31 15:11:25 UTC 2017
I wonder why the display names for timezone MET changed ( I observed this on Linux and Solaris) when I compare
jdk8 to jdk9 .
The test is very small, it just outputs for Locale.GERMAN the display name.
With jdk8 we get a translated german timezone name, but not with jdk9 (this is a bit strange because the jdk9 rsource file
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java
still contains the translation).
Is this intentional or a bug ?
Best regards, Matthias
TimeZoneTest.java
------------------------
import java.util.TimeZone;
import java.util.Locale;
public class TimeZoneTest {
public static void main(String[] args)
{
TimeZone tz = TimeZone.getDefault();
// now test for german
String dng = tz.getDisplayName(Locale.GERMAN);
System.out.println("timezone display name for Locale.GERMAN " + dng);
}
}
------------------------
for environment variable TZ=MET (export TZ=MET) we get :
../output-jdk8/images/j2sdk-image/bin/java TimeZoneTest
timezone display name for Locale.GERMAN Zentraleuropäische Zeit
../output-jdk9/images/jdk/bin/java TimeZoneTest
timezone display name for Locale.GERMAN Middle Europe Time
More information about the core-libs-dev
mailing list