-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.1.7, 1.2.0
-
x86
-
windows_98, windows_nt
Name: gsC80088 Date: 02/04/99
new Date() is out by 1 hour because of a DST error.
I'm running in Melbourne, Australia. Melbourne has the same
DST rules as Sydney, Australia. These are different from those
for Brisbane, Australia: Brisbane doesn't have DST;
Melbourne and Sydney do.
My NT timezone is set to GMT+10 (Australia/Brisbane+Sydney+Melbourne).
The following program demonstrates that user.timezone is being
set to Australia/Brisbane instead of Australia/Sydney, which means
that new Date() is out by 1 hour - it's not DST-adjusted and it
should be.
This used to work in JDK 1.1 because all of eastern Australia
was in AET. This of course was wrong for Brisbane!
public class Timezone
{
public static void main(String[] args)
{
System.out.println("user.timezone="+System.getProperties().getProperty("user.timezone"));
}
}
Output:
user.timezone=Australia/Brisbane
As Melbourne and Sydney are the two biggest cities and are
in the two most populous states (Victoria and NSW respectively),
the JDK 1.1 error was marginally preferable to the JDK 1.2 error.
(Review ID: 48539)
======================================================================
- duplicates
-
JDK-4252829 Win32: platform-to-java timezone mapping has errors; mapping tables are obsolete
-
- Resolved
-
- relates to
-
JDK-4212004 TimeZone.getDefault() fails for EST time zone in Australia
-
- Resolved
-
-
JDK-4158102 Solaris: TimeZone misinterprets zone id MET as "Iran Standard Time"
-
- Closed
-