-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.2
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If I set my timezone to (GMT+8:00) Kuala Lumpur, Singapore with 'Automatically adjust clock for daylight saving changes' checked on other timezones (because (GMT+8:00) Kuala Lumpur, Singapore itself doesn't have Daylight Saving Time), run the test progam, it returns incorrect default timezone as GMT.
If I uncheck the Daylight Saving checkbox, it returns correct timezone as GMT+8:00.
But if I set my timezone to (GMT+8:00) Perth or (GMT+8:00) Beijing, it returns correct timezone regardless whether I set the Daylight Saving time in other regions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Test 1:
1. Select Windows XP timezone as (GMT+10:00) Canberra, Melbourne, Sydney.
2. Check the 'Automatically adjust clock for daylight saving changes' checkbox.
3. Change the timezone to (GMT+8:00) Kuala Lumpur, Singapore.
4. Run test program
Test 2:
1. Select Windows XP timezone as (GMT+10:00) Canberra, Melbourne, Sydney.
2. Uncheck the 'Automatically adjust clock for daylight saving changes' checkbox.
3. Change the timezone to (GMT+8:00) Kuala Lumpur, Singapore.
4. Run test program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For Test1, it should return as follows,
sun.util.calendar.ZoneInfo[id="GMT+08:00",offset=28800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
ACTUAL -
sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,tran
sitions=0,lastRule=null]
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
public class DefaultTimezoneTest {
public static void main(String[] argv) {
System.out.println("Current Time Zone:");
System.out.println(TimeZone.getDefault());
}
}
---------- END SOURCE ----------
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If I set my timezone to (GMT+8:00) Kuala Lumpur, Singapore with 'Automatically adjust clock for daylight saving changes' checked on other timezones (because (GMT+8:00) Kuala Lumpur, Singapore itself doesn't have Daylight Saving Time), run the test progam, it returns incorrect default timezone as GMT.
If I uncheck the Daylight Saving checkbox, it returns correct timezone as GMT+8:00.
But if I set my timezone to (GMT+8:00) Perth or (GMT+8:00) Beijing, it returns correct timezone regardless whether I set the Daylight Saving time in other regions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Test 1:
1. Select Windows XP timezone as (GMT+10:00) Canberra, Melbourne, Sydney.
2. Check the 'Automatically adjust clock for daylight saving changes' checkbox.
3. Change the timezone to (GMT+8:00) Kuala Lumpur, Singapore.
4. Run test program
Test 2:
1. Select Windows XP timezone as (GMT+10:00) Canberra, Melbourne, Sydney.
2. Uncheck the 'Automatically adjust clock for daylight saving changes' checkbox.
3. Change the timezone to (GMT+8:00) Kuala Lumpur, Singapore.
4. Run test program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For Test1, it should return as follows,
sun.util.calendar.ZoneInfo[id="GMT+08:00",offset=28800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
ACTUAL -
sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,tran
sitions=0,lastRule=null]
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
public class DefaultTimezoneTest {
public static void main(String[] argv) {
System.out.println("Current Time Zone:");
System.out.println(TimeZone.getDefault());
}
}
---------- END SOURCE ----------
- relates to
-
JDK-6390869 TimeZone.getDefault() returns different timezones for Windows GMT-12 when DST is checked and not.
- Resolved