-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.6, 1.2.0
-
x86, sparc
-
solaris_2.6, windows_95
Name: dgC58589 Date: 01/21/98
This program returns "time zone = GMT offset=0" when I'm in Colorado.
import java.util.TimeZone ;
public class tzbug
{
public static void main(String args[]) throws Exception
{
TimeZone tz = TimeZone.getDefault() ;
System.out.println("time zone = " + tz.getID() + " offset=" + tz.getRawOffset()) ;
}
}
Documentation for Java.util.TimeZone says :
Typically, you get a TimeZone using getDefault which creates a TimeZone based on the time zone where the program is running. For example, for a program running in Japan, getDefault creates a TimeZone object based on Japanese Standard Time.
which implies that java should get MDT from the system.
(Review ID: 23541)
======================================================================
- duplicates
-
JDK-4105830 TimeZone.getDefault() return wrong timezone.
-
- Closed
-
-
JDK-4044013 VM not detecting host timezone correctly (was Clock is not displaying correct ti
-
- Closed
-