java.util.TimeZone (JDK 1.1)
The TimeZone class represents a time zone; it is used with the Calendar and DateFormat classes.
As an abstract class, TimeZone cannot be directly instantiated. Instead, you should call the static getDefault() method to obtain a TimeZone object that represents the time zone inherited from the host operating system. Or, you should call getTimeZone() (also static), passing the name of the desired zone. You can obtain a list of the supported time zone names by calling the static getAvailableIDs() method.
Once you have a TimeZone object, you can call inDaylightTime() to determine whether, for a given Date, daylight savings time is in effect for that time zone. Call getID() to obtain the name of the time zone, and call getOffset() for a given date to determine the number of milliseconds to add to GMT to convert to the time zone.
public abstract classTimeZoneextends Object implements Serializable, Cloneable { //Default Constructor: public TimeZone()//Class Methodspublic static synchronized String[]getAvailableIDs(intrawOffset); public static synchronized String[]getAvailableIDs(); public static synchronized TimeZonegetDefault(); public static synchronized TimeZonegetTimeZone(StringID); public static synchronized voidsetDefault(TimeZonezone); //Public Instance Methodspublic Objectclone(); //Overrides Objectpublic StringgetID(); public abstract intgetOffset(intera, intyear, intmonth, intday, intdayOfWeek, intmilliseconds); public abstract intgetRawOffset(); public abstract booleaninDaylightTime(Datedate); public voidsetID(StringID); public abstract voidsetRawOffset(intoffsetMillis); public abstract booleanuseDaylightTime(); }
Extended By:
SimpleTimeZone
Passed To:
Calendar(), Calendar.getInstance(), Calendar.setTimeZone(), DateFormat.setTimeZone(), GregorianCalendar(), TimeZone.setDefault()
Returned By:
Calendar.getTimeZone(), DateFormat.getTimeZone(), TimeZone.getDefault(), TimeZone.getTimeZone()