JDK-4267620 : wrong time offsets, and short time representation [Solaris's jdk1.2.1's TimeZone
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.1
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 1999-09-01
  • Updated: 1999-09-01
  • Resolved: 1999-09-01
Related Reports
Duplicate :  
Relates :  
Description
The jdk1.2.1's SimpleDateFormat.format() either produces GMT+xx strings instead of 
the expected 3 letter acronyms (short time representation) for specific 
time zones (see table below), and/or displays the wrong times (1 hour offset).
Also, for some timezones, the string displayed  by  the java VM does not match what is returned by the Solaris date command.

Timezone setting (TZ)	Solaris Date	Java VM		Time Calculation
---------------------	--------------	------------	----------------------
GMT			GMT		GMT+00:00		OK
GB			BST		GMT+01:00		OK
MET			MET DST		CEST			OK
W-SU			MSD		GMT+04:00		OK
Australia/West		WST		CST			OK
Australia/North		CST		GMT+09:30		OK
Australia/NSW		EST		GMT+10:00		OK
EET			EET DST		GMT+03:00		OK
Brazil/West		WST		GMT-04:00		OK
Israel			IST		GMT+03:00		1 hour difference


1. Change time zone setting by changing the TZ value.
	setenv TZ <timezone>
2. Note the date, and time and timezone label.
3. Using java, do a System.out.println(formatter.format(currentTime))
 	where formatter is a SimpleDateFormat, and currentTime is a 
	Data object. 

Comments
EVALUATION Wrong time zone offset comes from problems of Solaris to Java time zone mapping. (bugid: 4256581) "GMT+xx" is a problem of DateFormatZoneData. (bugid: 4261506) Both bugs will be fixed before Kestrel FCS. Closing this bug as a dup of 4261506. masayoshi.okutsu@Eng 1999-09-01
01-09-1999