JDK-4514389 : [Fmt-Da] RFE: DateFormat is not sensitive to Windows locale setting
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.3.1,1.4.2
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2001-10-13
  • Updated: 2019-04-11
Related Reports
Duplicate :  
Relates :  
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

Run this program:
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class DisplayDateFormat
   public static void main(String args[])
      SimpleDateFormat dateFormat;

      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) 

EVALUATION DateFormat uses fixed locale resources for date/time formats. ###@###.### 2001-10-16