ello,
 
Some more info. I used java 1.2.2_005 to run the same program. It gave me the right HOUR and HOUR_OF_DAY values (1 less than the output of java 1.3.0), although the useDaylight field is also true (I think I have misunderstood the meaning of that field earlier).
 
Has anyone experienced the same problem?
 
cheers
romen
-----Original Message-----
From: Romen Law
Sent: Tuesday, September 18, 2001 11:01 AM
To: 'Orion-Interest'
Subject: Daylight saving field

ello,
 
This is a bit off topic, but I really need to know.
 
Java (1.3.0) is returning me the wrong time when using Calendar. Here is the output of print of Calendar.getInstance():
 
java.util.GregorianCalendar[time=1000774314970,areFieldsSet=true,areAllFieldsSet
=true,lenient=true,zone=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600
0000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=7,st
artDay=-1,startDayOfWeek=1,startTime=7200000,startTimeMode=1,endMode=2,endMonth=
2,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=1],firstDayOfWeek=1,minim
alDaysInFirstWeek=1,ERA=1,YEAR=2001,MONTH=8,WEEK_OF_YEAR=38,WEEK_OF_MONTH=4,DAY_
OF_MONTH=18,DAY_OF_YEAR=261,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=11
,HOUR_OF_DAY=11,MINUTE=51,SECOND=54,MILLISECOND=970,ZONE_OFFSET=36000000,DST_OFF
SET=3600000]
 
Here are the system date time:
C:\temp>date
The current date is: Tue 09/18/2001
Enter the new date: (mm-dd-yy)
C:\temp>time
The current time is: 10:52:10.67
Enter the new time:
 
All fields except 3 are wrong:
useDaylight should be false;
HOUR and HOUR_OF_DAY should be 10.
 
This has happened on two machines running two different OS (W2k and Linux).
 
Sydney is not in daylight saving (DS) yet. But last year because of Olympic DS was started early - in September. But that's a one year thing only. Is there some setting that I missed ?
 
cheers
romen


This Email is intended only for the use of the individual or entity

named above and may contain information that is confidential and

privileged. If you are not the intended recipient, you are hereby

notified that any dissemination, distribution or copying of this

Email is strictly prohibited. Before opening or using attachments,

check them for viruses and defects.


If you have received this Email in error, please notify us

immediately by return email or telephone +61 2 8220 6000 and

destroy the original message. Thank You.



Reply via email to