API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. SimpleTimeZone View Source
Author(s)
David Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu
Since
1.1
Version
1.51 11/17/05
Serial
Hierarchy
 Object
      TimeZone
          SimpleTimeZone
Implements
Subclasses
Description
public class SimpleTimeZone
  SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
Constructors
public SimpleTimeZone (int rawOffset, String ID)
  Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID with no daylight saving time schedule.
public SimpleTimeZone (int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)
  Constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time.
public SimpleTimeZone (int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings)
  Constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time.
public SimpleTimeZone (int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int dstSavings)
  Constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time.
Methods
Hide/Show inherited methods
public Object clone () [Overrides TimeZone]
  Returns a clone of this SimpleTimeZone instance.
public boolean equals (Object obj)
  Compares the equality of two SimpleTimeZone objects.
publicstaticsynchronized String getAvailableIDs () [Inherited From TimeZone]
  Gets all the available IDs supported.
publicstaticsynchronized String getAvailableIDs (int rawOffset) [Inherited From TimeZone]
  Gets the available IDs according to the given time zone offset in milliseconds.
publicstatic TimeZone getDefault () [Inherited From TimeZone]
  Gets the default TimeZone for this host.
pack-privatestatic TimeZone getDefaultRef () [Inherited From TimeZone]
  Returns the reference to the default TimeZone object.
publicfinal String getDisplayName () [Inherited From TimeZone]
  Returns a name of this time zone suitable for presentation to the user in the default locale.
publicfinal String getDisplayName (boolean daylight, int style) [Inherited From TimeZone]
  Returns a name of this time zone suitable for presentation to the user in the default locale.
public String getDisplayName (boolean daylight, int style, Locale locale) [Inherited From TimeZone]
  Returns a name of this time zone suitable for presentation to the user in the specified locale.
publicfinal String getDisplayName (Locale locale) [Inherited From TimeZone]
  Returns a name of this time zone suitable for presentation to the user in the specified locale.
public int getDSTSavings () [Overrides TimeZone]
  Returns the amount of time in milliseconds that the clock is advanced during daylight saving time.
public String getID () [Inherited From TimeZone]
  Gets the ID of this time zone.
public int getOffset (int era, int year, int month, int day, int dayOfWeek, int millis) [Specified in TimeZone]
  Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight saving, for the specified date and time.
public int getOffset (long date) [Overrides TimeZone]
  Returns the offset of this time zone from UTC at the given time.
pack-private int getOffsets (long date, int[] offsets) [Overrides TimeZone]
 
public int getRawOffset () [Specified in TimeZone]
  Gets the GMT offset for this time zone.
publicstaticsynchronized TimeZone getTimeZone (String ID) [Inherited From TimeZone]
  Gets the TimeZone for the given ID.
publicsynchronized int hashCode ()
  Generates the hash code for the SimpleDateFormat object.
public boolean hasSameRules (TimeZone other) [Overrides TimeZone]
  Returns true if this zone has the same rules and offset as another zone.
public boolean inDaylightTime (Date date) [Specified in TimeZone]
  Queries if the given date is in daylight saving time.
publicstatic void setDefault (TimeZone zone) [Inherited From TimeZone]
  Sets the TimeZone that is returned by the getDefault method.
public void setDSTSavings (int millisSavedDuringDST)
  Sets the amount of time in milliseconds that the clock is advanced during daylight saving time.
public void setEndRule (int endMonth, int endDay, int endTime)
  Sets the daylight saving time end rule to a fixed date within a month.
public void setEndRule (int endMonth, int endDay, int endDayOfWeek, int endTime)
  Sets the daylight saving time end rule.
public void setEndRule (int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after)
  Sets the daylight saving time end rule to a weekday before or after the given date within a month, e.g., the first Monday on or after the 8th.
public void setID (String ID) [Inherited From TimeZone]
  Sets the time zone ID.
public void setRawOffset (int offsetMillis) [Specified in TimeZone]
  Sets the base time zone offset to GMT.
public void setStartRule (int startMonth, int startDay, int startTime)
  Sets the daylight saving time start rule to a fixed date within a month.
public void setStartRule (int startMonth, int startDay, int startDayOfWeek, int startTime)
  Sets the daylight saving time start rule.
public void setStartRule (int startMonth, int startDay, int startDayOfWeek, int startTime, boolean after)
  Sets the daylight saving time start rule to a weekday before or after the given date within a month, e.g., the first Monday on or after the 8th.
public void setStartYear (int year)
  Sets the daylight saving time starting year.
public String toString ()
  Returns a string representation of this time zone.
public boolean useDaylightTime () [Specified in TimeZone]
  Queries if this time zone uses daylight saving time.
Fields
Hide/Show inherited fields
pack-privatefinalstatic int currentSerialVersion = "2"
pack-privatefinalstatic String GMT_ID = "GMT" [Inherited From TimeZone]
publicfinalstatic int LONG = "1" [Inherited From TimeZone]
  A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
pack-privatefinalstatic TimeZone NO_TIMEZONE [Inherited From TimeZone]
The null constant as a TimeZone.
pack-privatefinalstatic long serialVersionUID = "-403250971215465050" [Overrides TimeZone]
publicfinalstatic int SHORT = "0" [Inherited From TimeZone]
  A style specifier for getDisplayName() indicating a short name, such as "PST."
publicfinalstatic int STANDARD_TIME = "1"
  Constant for a mode of start or end time specified as standard time.
publicfinalstatic int UTC_TIME = "2"
  Constant for a mode of start or end time specified as UTC.
publicfinalstatic int WALL_TIME = "0"
  Constant for a mode of start or end time specified as wall clock time.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar