Name: gm110360 Date: 10/12/2001
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
Opened Regional Options on Windows 2000 and changed Date format to 'yyyy-MM-dd'
and pressed apply (using locale Norwegian(Bokm��l), but same problem with English
(US)).
Run this program:
import java.text.DateFormat;
import java.text.SimpleDateFormat;
public class DisplayDateFormat
{
public static void main(String args[])
{
SimpleDateFormat dateFormat;
dateFormat=((SimpleDateFormat)DateFormat.getDateInstance
(DateFormat.SHORT));
System.out.println("Date format: "+dateFormat.toPattern());
}
}
The output is:
Date format: dd.MM.yy
The expected output is
Date format: yyyy-MM-dd
Looks like DateFormat.getInstance() doesn't use the values specified in the
Regional Options on Windows 2000. I think this works on Windows NT4 (can't
remember this problem there).
Tryed the same with JRE 1.4 Beta 2 and got the same result.
(Review ID: 133645)
======================================================================