JDK-4141080 : The Time Zone id name for PRC is wrong.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submitted: 1998-05-22
  • Updated: 1999-01-19
  • Resolved: 1999-01-19
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.2.0 1.2fcsFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
JDK Version: 1.2beta4-G
OS: Soalris 2.6
Locale: zh

In 1.2beta4-G build, the Time Zone id name for PRC is wrong, but the
date time value is right. Current id name for PRC is :"Asia/Irkutsk", 
it is a city of Russia.

==========================CheckTimeZone.java=================================
import java.util.*;
import java.text.*;

public class CheckTimeZone {
    
    public static void main(String args[]) {
	System.out.println("Time Zone is : " + TimeZone.getDefault().getID());
    }
}
==============================================================================

java CheckTimeZone
Time Zone is: Asia/Irkutsk
I think it is not correct. Current TimeZone ids
in JDK1.2beta4-G include Asis/Shanghai, may be
it is the right name for PRC, but it is better
if there exists a id name as "Asia/Beijing" for
PRC.


jim.hu@prc 1998-05-22


This bug hasn't been fixed in 1.2 beta4-K. The following is the result of CheckTimeZone.

% env TZ=PRC /usr/local/java/jdk1.2/solaris/bin/java CheckTimeZone
Time Zone is : Asia/Irkutsk

Note that zh locale is not installed on the machine.

For other timezones, it returns a wrong value.

% env TZ=ROK /usr/local/java/jdk1.2/solaris/bin/java CheckTimeZone
Time Zone is : Asia/Yakutsk
% env TZ=ROC /usr/local/java/jdk1.2/solaris/bin/java CheckTimeZone
Time Zone is : Asia/Irkutsk
% env TZ=Hongkong /usr/local/java/jdk1.2/solaris/bin/java CheckTimeZone
Time Zone is : Asia/Irkutsk

Also, formatted date/time information is wrong for all of the timezones above, which should be filed as a separate bug report.
masayoshi.okutsu@Eng 1998-07-07


Hi Alan,
In latest several JDK builds, the TimeZone id name for PRC is Asia/Shanghai, it
looks better than before now, but I got little knowledge in this area, like
TimeZone and daylight, etc. One thing I want to be confirmed here is, before
JDK's birth, the international standard TimeZone name for PRC is Asia/Shanghai 
or Asia/Irkutsk? not Asia/Beijing? Anyway, thanks for your work.
[jim.hu@prc 1998-07-24]

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

EVALUATION Solaris is returning the wrong values for PRC. Workaround will be added for JDK 1.2 beta 4. mark.son-bell@eng 1998-06-30 It is not wrong. The PRC timezone used to have daylight saving time from 1986 until 1991. To be able to format any given time, time zone support requires information of daylight saving time history. The `daylight' value indicates whether the timezone has or used to have daylight saving time. Therefore, usage of the daylight value in JDK is incorrect. Refer to zic(1M) and ctime(3C) man pages and /usr/share/lib/zoneinfo/asia for details. masayoshi.okutsu@Eng 1998-07-07 I believe our current policy is to only support contemporary time zones, not historical ones. The current API makes no provision for historical data. The TimeZone and DateFormat code should work correctly for current zones. As far as the VM initialization bug, I believe this was fixed and has been integrated -- can someone confirm this so this bug can be closed? alan.liu@eng 1998-07-23 The VM init code still refers to the `daylight' value which reflects historical time zone info. This must be fixed. Also, if Java time zone support doesn't address historical info, the API documentation must clarify this since the Java API supports formatting of any given time. (I consider it as a bug, though.) masayoshi.okutsu@Eng 1998-07-23 Fixed in JDK1.2 FCS-M, but the value is Asia/Shanghai, better one is Asia/Beijing.
23-07-1998