JDK-4116747 : DateFormat for Japanese locale is broken on 116H
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.1.6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-03-03
  • Updated: 1998-03-04
  • Resolved: 1998-03-04
Related Reports
Duplicate :  
Relates :  
Description
See the result below from the test prgram:

import java.text.*;
import java.util.*;

class dttest {
        static final int[] format = {
                DateFormat.FULL,
                DateFormat.LONG,
                DateFormat.MEDIUM,
                DateFormat.SHORT,
        };

        public static void main(String[] arg) {
                Date date = new Date();
                for (int i = 0; i<format.length; i++) {
                        DateFormat fmt = DateFormat.getDateTimeInstance(format[i],
                        format[i]);
                        DateFormat fmt_en = DateFormat.getDateTimeInstance(format[i],
                        format[i], Locale.ENGLISH);
                        System.out.println(fmt.format(date));
                        System.out.println(fmt_en.format(date) + "\n");
                }
        }
}

Test was done on Solaris2.5.1 under ja locale.

1.1.5 fcs

1998  03  03      15 17 21 JST
Monday, March 2, 1998 10:17:21 o'clock PM PST

1998/03/03   15:17:21:JST
March 2, 1998 10:17:21 PM PST

98/03/03 15:17:21
02-Mar-98 10:17:21 PM

03/03 15:17
3/2/98 10:17 PM

1.1.6H
1998 3 3  13 24 53 GMT+09:00
Tuesday, March 3, 1998 1:24:53 o'clock PM JST

1998/03/03 13:24:53:GMT+09:00
March 3, 1998 1:24:53 PM JST

1998/03/03 13:24:53
03-Mar-98 1:24:53 PM

98/03/03 13:24
3/3/98 1:24 PM

Problems:
  Time zone is always GMT+09:00 under ja locale.
  because kZoneStrings in DateFormatZoneData_ja containes incorrect timezone
  string.
  This is 116 regression.

  Formatted date and time is inconsistent between Japanese and English locale.
  The full format on 1.1.5 has the day of the week, but 1.1.6 doesn't.
  English has AM/PM but not for Japanese on both 1.1.5 and 1.1.6.
  This is probably RFE.

  Era definition is missing for Japanese locale.
  This is regression.
  There is no equivarent entry in LocaleElement
            { "Eras",
                new String[] { // era strings
                    "BC",
                    "AD"
                }
  for Japanese locale. It should be translated to Kigenzen and Kigengo.

Comments
EVALUATION mark.son-bell@eng 1998-03-04 This bug is actually 3 separate bugs. First is the bug that "Time zone is always GMT+09:00 under ja locale". This was 1.1.6 regression that has been fixed. The duplicate bug number is 4108407. The second part of the bug says "English has AM/PM but not for Japanese". This is a real bug, probably in the Japanese locale data. The third part of the bug says that the era definition is missing for the Japanese locale. This is a dup of 4071770. I'll close this bug as a dup, and open a new bug for the AM/PM locale data issue. Bug #4117054 mark.son-bell@eng 1998-03-05 After further investigation into the first part of this bug, there is a possibility that this is indeed a 1.1.6 regression on Solaris. Needs further investigation. BugTraq won't let me re-open a bug that has been closed as a duplicate, so I openned a new bug #4117355.
11-06-2004