-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6u10
-
x86
-
windows_2003
FULL PRODUCT VERSION :
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 5.2.3790]
A DESCRIPTION OF THE PROBLEM :
I am using GregorianCalendar class to get current time.
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
If i print "currenttime ", it is printing wrong time.
Current system time is 19:00, but it is giving 08:30 VET
The time zone of my system is "GMT+6:00 Dhaka".
Previously my system time zone was "GMT-6:00 Central Time (US & Canada)" and "Automatically adjust clock for daylight saving changes" is checked.
Here everything is fine.
Only after changing this time zone to "GMT+6:00 Dhaka", I am facing this issue.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Set the system time zone to "GMT-6:00 Central Time (US & Canada)" and check "Automatically adjust clock for daylight saving changes". Click Apply
2. Now change the time zone to "GMT+6:00 Dhaka". and click apply.
Now using the below api, print the current time.
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Thu Jun 16 19:15:20 GMT+6:00 2010
ACTUAL -
Thu Jun 16 08:45:20 VET 2010
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
System.out.println("Current time is = "+currenttime );
---------- END SOURCE ----------
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 5.2.3790]
A DESCRIPTION OF THE PROBLEM :
I am using GregorianCalendar class to get current time.
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
If i print "currenttime ", it is printing wrong time.
Current system time is 19:00, but it is giving 08:30 VET
The time zone of my system is "GMT+6:00 Dhaka".
Previously my system time zone was "GMT-6:00 Central Time (US & Canada)" and "Automatically adjust clock for daylight saving changes" is checked.
Here everything is fine.
Only after changing this time zone to "GMT+6:00 Dhaka", I am facing this issue.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Set the system time zone to "GMT-6:00 Central Time (US & Canada)" and check "Automatically adjust clock for daylight saving changes". Click Apply
2. Now change the time zone to "GMT+6:00 Dhaka". and click apply.
Now using the below api, print the current time.
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Thu Jun 16 19:15:20 GMT+6:00 2010
ACTUAL -
Thu Jun 16 08:45:20 VET 2010
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
GregorianCalendar today = new GregorianCalendar();
Date currenttime = today.getTime();
System.out.println("Current time is = "+currenttime );
---------- END SOURCE ----------
- duplicates
-
JDK-6929185 (tz) Windows-only: tzmappings needs update for KB979306
-
- Resolved
-