-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Service Pack 2
A DESCRIPTION OF THE PROBLEM :
Java determinates incorrect time zone in Asia/Irkutsk. Java supposes that it is Asia/Ulaanbaatar. Asia/Irkutsk use winter/summer time, Asia/Ulaanbaatar not. So, System.out.println(Calendar.getInstance().getTime()); prints wrong time when there is a summer time in Asia/Irkutsk. It prints one hour earlier time.
For example, it prints Sat May 07 09:53:12 ULAT 2005 when time is 10:53.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set computer locale GMT+8, Ulaanbaatar/Irkutsk, use summer time; and date, when summer time is used, for example now (7th May) in Windows Control Panel. Execute System.out.println(Calendar.getInstance().getTime()); . It will print wrong time.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Valid system time.
ACTUAL -
Wrong system time.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Calendar;
public class Test {
public static void main(String[] args) {
System.out.println(Calendar.getInstance().getTime());
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Set time zone to Asia/Irkutsk manually on program start. But it is not a good solution.
###@###.### 2005-05-24 11:57:10 GMT
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Service Pack 2
A DESCRIPTION OF THE PROBLEM :
Java determinates incorrect time zone in Asia/Irkutsk. Java supposes that it is Asia/Ulaanbaatar. Asia/Irkutsk use winter/summer time, Asia/Ulaanbaatar not. So, System.out.println(Calendar.getInstance().getTime()); prints wrong time when there is a summer time in Asia/Irkutsk. It prints one hour earlier time.
For example, it prints Sat May 07 09:53:12 ULAT 2005 when time is 10:53.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set computer locale GMT+8, Ulaanbaatar/Irkutsk, use summer time; and date, when summer time is used, for example now (7th May) in Windows Control Panel. Execute System.out.println(Calendar.getInstance().getTime()); . It will print wrong time.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Valid system time.
ACTUAL -
Wrong system time.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Calendar;
public class Test {
public static void main(String[] args) {
System.out.println(Calendar.getInstance().getTime());
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Set time zone to Asia/Irkutsk manually on program start. But it is not a good solution.
###@###.### 2005-05-24 11:57:10 GMT
- duplicates
-
JDK-5054346 Support tzdata2004a
- Closed
- relates to
-
JDK-6277315 JCK: api/java_util/TimeZone/index.html#static fails on Win 2000, Win XP Home
- Closed
-
JDK-2124189 (tz) Support tzdata2005g
- Closed