JDK-4210530 : Date.toString() gives incorrect, GMT time
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1999-02-10
  • Updated: 1999-06-13
  • Resolved: 1999-06-13
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 02/10/99


bernardv@guadalajara[720]: uname -a
SunOS guadalajara 5.5.1 Generic_103640-04 sun4u sparc SUNW,Ultra-1

csh
echo $LANG -> C
echo $TZ   -> MET

java code:
System.out.println((new Date()).toString());

result:
Fri Aug 21 17:05:29 GMT+04:30 1998

while shell # date gives:
Fri Aug 21 14:36:02 MET DST 1998

the difference is +2:30 hours; it should be
-2:00 hours right now in summer.
(Review ID: 37437)
======================================================================

Comments
WORK AROUND Name: dbT83986 Date: 02/10/99 Not sure... but I guess Date.toString() sees a DST and not a MET in the system date string... I need accurate dates to build timestamps in $300,000 mission critical CORBA app. for important cust. Tnx. ======================================================================
11-06-2004

EVALUATION Please close as a duplicate of 4158102. alan.liu@eng 1999-03-19 JVM initialization falls back to tzname[0] to Java time zone name mapping. But Java timezone names are different from those of Solaris. masayoshi.okutsu@Eng 1999-05-25
19-03-1999