JDK-4380166 : Regression: Date/Time displayed under jdk1.3 is not the same as jdk1.2
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt,windows_2000
  • CPU: x86
  • Submitted: 2000-10-17
  • Updated: 2000-10-18
  • Resolved: 2000-10-18
Related Reports
Duplicate :  
Description

Name: rmT116609			Date: 10/17/2000


Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1996 Microsoft Corp.

H:\>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

H:\>


I am having a problem with date/times displays which is related to daylight
savings. I am extracting
dates and times from an Oracle database and then displaying them in an applet
but the displayed
times are 1 hour latter than the database data. In tracking down this anomaly I
noticed that the
system times being displayed in the logging where also out 1 hour. So to track
this down I ran the
following the following code: using jdk1.3 the output shows the time as being 1
hour latter than
the time shown on the tool bar clock (the pc's clock). The pc's time zone is
set to
Australia/Adelaide. When the same code is compiled and run under jdk1.2 it
displays the same
time as the toolbar clock.

==========================================================================

**************Source:
import java.util.*;

public class Test_DateOutput  {

	public static void main(String args[]) {

    System.out.println("System TimeZone: " + TimeZone.getDefault ());
    java.util.Date systemDate = new java.util.Date();
    System.out.println("System date/time: " + systemDate.toString ());

    System.out.println();
    System.out.println("================================================");
    System.out.println("user.timezone="+System.getProperties().getProperty
("user.timezone"));
    System.out.println();
    System.out.println("================================================");
    System.out.println("timezone=" + TimeZone.getDefault ().toString ());
	}
}
************* end of source.
==============================================================================

******* JDK1.2 - Output

C:\Test\TestDates\1_2>c:

C:\Test\TestDates\1_2>cd \Test\TestDates\1_2

C:\Test\TestDates\1_2>C:\JBuilder35\jdk1.2.2\bin\java Test_DateOutput
================================================
user.timezone=Australia/Adelaide

System TimeZone: java.util.SimpleTimeZone[id=Australia/Adelaide,offset=34200000,
dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=9,startDa
y=-1,startDayOfWeek=1,startTime=7200000,endMode=2,endMonth=2,endDay=-1,endDayOfW
eek=1,endTime=10800000]

================================================
System date/time: Wed Oct 11 14:52:32 GMT+09:30 2000

================================================================================
======

******* JDK1.3 - Output

C:\Test\TestDates\1_3>c:

C:\Test\TestDates\1_3>cd \Test\TestDates\1_3

C:\Test\TestDates\1_3>C:\jdk1.3\bin\java Test_DateOutput
================================================
user.timezone=

System TimeZone: java.util.SimpleTimeZone[id=Australia/Adelaide,offset=34200000,
dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=7,startDa
y=-1,startDayOfWeek=1,startTime=7200000,startTimeMode=1,endMode=2,endMonth=2,end
Day=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=1]

================================================
System date/time: Wed Oct 11 15:52:40 GMT+10:30 2000

********* End of output.
=============================

I notice that for 1.3 the dstSavings startMonth=7 but for 1.2 its 9?
(Review ID: 110684) 
======================================================================

Comments
EVALUATION There was an error (or old information) about the Sydney Olympic Games related DST schedule change in the public time zone information (tzdata1999e in August 1999) which went to J2SE 1.3 FCS for Win32. Linux and Solaris versions (1.3) have data from tzdata2000d which has correct DST schedules. This Win32 problem will be fixed in Ladybird. FYI: (from tzdata2000g) # See the following official NSW source: # <a href="http://dir.gis.nsw.gov.au/cgi-bin/genobject/document/other/daylightsaving/tigGmZ"> # Daylight Saving in New South Wales. # </a> # # Narrabri Shire (NSW) council has announced it will ignore the extension of # daylight saving next year. See: # <a href="http://abc.net.au/news/regionals/neweng/monthly/regeng-22jul1999-1.htm"> # Narrabri Council to ignore daylight saving # </a> (1999-07-22). For now, we'll wait to see if this really happens. # # Victoria will following NSW. See: # <a href="http://abc.net.au/local/news/olympics/1999/07/item19990728112314_1.htm"> # Vic to extend daylight saving # </a> (1999-07-28). # # However, South Australia rejected the DST request. See: # <a href="http://abc.net.au/news/olympics/1999/07/item19990719151754_1.htm"> # South Australia rejects Olympics daylight savings request # </a> (1999-07-19). # # Queensland also will not observe DST for the Olympics. See: # <a href="http://abc.net.au/news/olympics/1999/06/item19990601114608_1.htm"> # Qld says no to daylight savings for Olympics # </a> (1999-06-01), which quotes Queensland Premier Peter Beattie as saying # ``Look you've got to remember in my family when this came up last time # I voted for it, my wife voted against it and she said to me it's all very # well for you, you don't have to worry about getting the children out of # bed, getting them to school, getting them to sleep at night. # I've been through all this argument domestically...my wife rules.'' # # Broken Hill will stick with South Australian time in 2000. See: # <a href="http://abc.net.au/news/regionals/brokenh/monthly/regbrok-21jul1999-6.htm"> # Broken Hill to be behind the times # </a> (1999-07-21). # IATA SSIM (1998-09) says that the spring 2000 change for Australian # Capital Territory, New South Wales except Lord Howe Island and Broken # Hill, and Victoria will be August 27, presumably due to the Sydney Olympics. # From Eric Ulevik, referring to Sydney's Sun Herald (2000-08-13), page 29: # Twin Towns Services Club (in Tweed Heads, near the Queensland border) # will maintain Queensland time. The Queensland Premier Peter Beattie # is encouraging northern NSW towns to use Queensland time. masayoshi.okutsu@Eng 2000-10-18
18-10-2000