-
Bug
-
Resolution: Fixed
-
P3
-
1.4.1
-
b28
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2130630 | 1.4.2_11 | Edmund Lou | P3 | Resolved | Fixed | b01 |
Name: nt126004 Date: 01/14/2003
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]
ADDITIONAL OPERATING SYSTEMS :
Windows 2000, perhaps other Win32 as well.
A DESCRIPTION OF THE PROBLEM :
If the Windows timezone is set to "Santiago", with a GMT
offset of -4, the JRE uses a default timezone of
"America/Caracas", when it should be using
"America/Santiago". Both time zones have a -4 offset, but
they have different daylight savings rules.
As a result, Java apps appear to be an hour behind during
summer in Chile.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Set Windows timezone to Santiago, GMT -4.
2. Run the attached code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual results:
default timezone = America/Caracas
correct timezone = America/Santiago
Time with default timezone = 16/12/02 00:00
Time with correct timezone = 16/12/02 01:00
Expected results:
default timezone = America/Santiago
correct timezone = America/Santiago
Time with default timezone = 16/12/02 00:00
Time with correct timezone = 16/12/02 00:00
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.TimeZone;
import java.util.Calendar;
import java.util.Date;
import java.text.DateFormat;
public class TZTest
{
public static void main(String[] argv)
{
TimeZone defaultTZ = TimeZone.getDefault();
System.out.println("default timezone = " + defaultTZ.getID());
TimeZone correctTZ = TimeZone.getTimeZone("America/Santiago");
System.out.println("correct timezone = " + correctTZ.getID());
Calendar calendar = Calendar.getInstance();
calendar.set(2002, 11, 16, 0, 0);
Date date = calendar.getTime();
DateFormat df = DateFormat.getInstance();
System.out.println("Time with default timezone = " + df.format(date));
df.setTimeZone(correctTZ);
System.out.println("Time with correct timezone = " + df.format(date));
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Manually set the timezone to the correct value.
(Review ID: 179188)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]
ADDITIONAL OPERATING SYSTEMS :
Windows 2000, perhaps other Win32 as well.
A DESCRIPTION OF THE PROBLEM :
If the Windows timezone is set to "Santiago", with a GMT
offset of -4, the JRE uses a default timezone of
"America/Caracas", when it should be using
"America/Santiago". Both time zones have a -4 offset, but
they have different daylight savings rules.
As a result, Java apps appear to be an hour behind during
summer in Chile.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Set Windows timezone to Santiago, GMT -4.
2. Run the attached code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual results:
default timezone = America/Caracas
correct timezone = America/Santiago
Time with default timezone = 16/12/02 00:00
Time with correct timezone = 16/12/02 01:00
Expected results:
default timezone = America/Santiago
correct timezone = America/Santiago
Time with default timezone = 16/12/02 00:00
Time with correct timezone = 16/12/02 00:00
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.TimeZone;
import java.util.Calendar;
import java.util.Date;
import java.text.DateFormat;
public class TZTest
{
public static void main(String[] argv)
{
TimeZone defaultTZ = TimeZone.getDefault();
System.out.println("default timezone = " + defaultTZ.getID());
TimeZone correctTZ = TimeZone.getTimeZone("America/Santiago");
System.out.println("correct timezone = " + correctTZ.getID());
Calendar calendar = Calendar.getInstance();
calendar.set(2002, 11, 16, 0, 0);
Date date = calendar.getTime();
DateFormat df = DateFormat.getInstance();
System.out.println("Time with default timezone = " + df.format(date));
df.setTimeZone(correctTZ);
System.out.println("Time with correct timezone = " + df.format(date));
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Manually set the timezone to the correct value.
(Review ID: 179188)
======================================================================
- backported by
-
JDK-2130630 (tz) Incorrect default timezone for Santiago, Chile on Win32.
-
- Resolved
-