-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.4.1
-
x86
-
windows_2000
Name: gm110360 Date: 09/04/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-
root_02_may_2002_02_43)
Java HotSpot(TM) Client VM (build 1.4, mixed mode)
windows 2000,
Also repeatable on MacOS
A DESCRIPTION OF THE PROBLEM :
When using java.util.TimeZone.getTimeZone() method
with "Etc/GMT+2" parameter I expect to receive either GMT
time zone because it could not be parser, or time zone with
-2 hours offset from GMT. What I do receive is timezone with
-1 offset from GMT!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run enclosed code example.
Compare expected and actual results.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual Results:
Etc/GMT-2 offset = 7200000
Etc/GMT+2 offset = -7200000
GMT+2 offset = 7200000
Europe/Kiev offset = 7200000
Expected Results:
Etc/GMT-2 offset = 0 or -720000
Etc/GMT+2 offset = 0 or 720000
GMT+2 offset = 7200000
Europe/Kiev offset = 7200000
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.TimeZone;
public class tztest
{
public static void main(String []args)
{
TimeZone tz1 = TimeZone.getTimeZone("Etc/GMT-2");
TimeZone tz2 = TimeZone.getTimeZone("Etc/GMT+2");
TimeZone tz3 = TimeZone.getTimeZone("GMT+2");
TimeZone tz4 = TimeZone.getTimeZone("Europe/Kiev");
System.out.println("Etc/GMT-2 offset = " + tz1.getRawOffset() );
System.out.println("Etc/GMT+2 offset = " + tz2.getRawOffset() );
System.out.println("GMT+2 offset = " + tz3.getRawOffset() );
System.out.println("Europe/Kiev offset = " + tz4.getRawOffset() );
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
work around is to use correct time zone name.
However it is not always possible, for example in cases when
it is typed by the user.
Release Regression From : 1.3.1_04
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 164029)
======================================================================
- relates to
-
JDK-4495052 RFE: Java should support complete set of Olson time zones
- Resolved