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)
======================================================================