JDK-4762201 : zh_CN DateFormat displayed incorrectly when PM time is displayed
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-10-11
  • Updated: 2002-11-22
  • Resolved: 2002-11-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description
The output and golden are different in zh_CN.

#5: \u4e0b\u534804\u65f600\u520600\u79d2 PST  <-- expected output
                --
vs: \u4e0b\u534816\u65f600\u520600\u79d2 PST  <-- system output
                --

when \u4e0b\u5348 (PM) is used, it should use 4 hours instead of 16 hours

This can be demostrated with GlobalSuite test case:
GlobalSuite/test/core/DateFormat/GetTimeInstanceTest.java

Please see the attached golden files, refer to 6th line for the correct display.

###@###.### 2002-10-11

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis VERIFIED IN: mantis
14-06-2004

EVALUATION In sun/text/resources/LocaleElements_zh.java, the date format used for this test case is defined as follows. { "DateTimePatterns", new String[] { "aHH'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern I don't know if this is a correct format to be used in zh locales, but the i18n function is working correctly. i.e., "HH" formats hour of day as 0-23. I'm closing this as "not a but". If necessary, reopen and assign this to localization. ###@###.### 2002-10-15 This is fine if \u4e0b\u5348 (PM) or \u4e0a\u5348 (AM) is not used. But if used together, it becomes redundant (i.e. 16:00 PM). ###@###.### 2002-10-14 The change was made to fix 4685470. ###@###.### 2002-10-17 ******** l10n evaluation - begin *********** Evaluation : This bug was introduced due to previous bug fix for 4685470. hh was replaced with HH, which created the problem. sccsdiff info (e.g. sccs diffs -r1.30 1.31 xxx_xx.java): % sccsdiff -r1.19 -r1.20 SCCS/s.LocaleElements_zh.java ------- LocaleElements_zh.java ------- 454c454 < "aHH'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern --- > "ahh'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern List file(s) to be delivered : src/share/classes/sun/text/resources/LocaleElements_zh.java Target Build : b08 (11/20) Additional Info : ******** l10n evaluation - end *********** ###@###.### 2002-11-07 ========================================================================= Verified with b08, fixed. ###@###.### 2002-11-21
07-11-2002