<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.util.SimpleTimeZone
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.ResourceBundle.html#_top_">Previous</a>  <a href="java.util.Stack.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.util.SimpleTimeZone
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.util.TimeZone.html#_top_">java.util.TimeZone</a>
           |
           +----java.util.SimpleTimeZone
</pre>
<hr>
<dl>
  <dt> public class <b>SimpleTimeZone</b>
  <dt> extends <a href="java.util.TimeZone.html#_top_">TimeZone</a>
</dl>
<code>SimpleTimeZone</code> is a concrete subclass of <code>TimeZone</code>
 that represents a time zone for use with a Gregorian calendar. This
 class does not handle historical changes.
 <P>
 Use a negative value for <code>dayOfWeekInMonth</code> to indicate that
 <code>SimpleTimeZone</code> should count from the end of the month backwards.
 For example, Daylight Savings Time ends at the last
 (dayOfWeekInMonth = -1) Sunday in October, at 2 AM in standard time.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>, <a href="java.util.GregorianCalendar.html#_top_">GregorianCalendar</a>, <a href="java.util.TimeZone.html#_top_">TimeZone</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SimpleTimeZone(int, java.lang.String)"><b>SimpleTimeZone</b></a>(int, String)
  <dd>  Constructs a SimpleTimeZone with the given base time zone offset from GMT
 and time zone ID.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int)"><b>SimpleTimeZone</b></a>(int, String, int, int, int, int, int, int, int, int)
  <dd>  Construct a SimpleTimeZone with the given base time zone offset from
 GMT, time zone ID, time to start and end the daylight time.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#clone()"><b>clone</b></a>()
  <dd>  Overrides Cloneable

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Compares the equality of two SimpleTimeZone objects.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getOffset(int, int, int, int, int, int)"><b>getOffset</b></a>(int, int, int, int, int, int)
  <dd>  Overrides TimeZone
 Gets offset, for current date, modified in case of
 daylight savings.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRawOffset()"><b>getRawOffset</b></a>()
  <dd>  Overrides TimeZone
 Gets the GMT offset for this time zone.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Override hashCode.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#inDaylightTime(java.util.Date)"><b>inDaylightTime</b></a>(Date)
  <dd>  Overrides TimeZone
 Queries if the given date is in Daylight Savings Time.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setEndRule(int, int, int, int)"><b>setEndRule</b></a>(int, int, int, int)
  <dd>  Sets the daylight savings ending rule.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setRawOffset(int)"><b>setRawOffset</b></a>(int)
  <dd>  Overrides TimeZone
 Sets the base time zone offset to GMT.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setStartRule(int, int, int, int)"><b>setStartRule</b></a>(int, int, int, int)
  <dd>  Sets the daylight savings starting rule.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setStartYear(int)"><b>setStartYear</b></a>(int)
  <dd>  Sets the daylight savings starting year.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Return a string representation of this time zone.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#useDaylightTime()"><b>useDaylightTime</b></a>()
  <dd>  Overrides TimeZone
 Queries if this time zone uses Daylight Savings Time.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="SimpleTimeZone"></a>
<a name="SimpleTimeZone(int, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SimpleTimeZone</b>
<pre>
 public SimpleTimeZone(int rawOffset,
                       <a href="java.lang.String.html#_top_">String</a> ID)
</pre>
<dl>
  <dd> Constructs a SimpleTimeZone with the given base time zone offset from GMT
 and time zone ID. Timezone IDs can be obtained from
 TimeZone.getAvailableIDs. Normally you should use TimeZone.getDefault to
 construct a TimeZone.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> rawOffset - The given base time zone offset to GMT.
    <dd> ID - The time zone ID which is obtained from
                   TimeZone.getAvailableIDs.
  </dl></dd>
</dl>
<a name="SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SimpleTimeZone</b>
<pre>
 public SimpleTimeZone(int rawOffset,
                       <a href="java.lang.String.html#_top_">String</a> ID,
                       int startMonth,
                       int startDay,
                       int startDayOfWeek,
                       int startTime,
                       int endMonth,
                       int endDay,
                       int endDayOfWeek,
                       int endTime)
</pre>
<dl>
  <dd> Construct a SimpleTimeZone with the given base time zone offset from
 GMT, time zone ID, time to start and end the daylight time. Timezone IDs
 can be obtained from TimeZone.getAvailableIDs. Normally you should use
 TimeZone.getDefault to create a TimeZone. For a time zone that does not
 use daylight saving time, do not use this constructor; instead you should
 use SimpleTimeZone(rawOffset, ID).
 By default, this constructor specifies day-of-week-in-month rules. That
 is, if the startDay is 1, and the startDayOfWeek is SUNDAY, then this
 indicates the first Sunday in the startMonth. A startDay of -1 likewise
 indicates the last Sunday. However, by using negative or zero values for
 certain parameters, other types of rules can be specified.
 Day of month. To specify an exact day of the month, such as March 1, set
 startDayOfWeek to zero.
 Day of week after day of month. To specify the first day of the week
 occurring on or after an exact day of the month, make the day of the week
 negative. For example, if startDay is 5 and startDayOfWeek is -MONDAY,
 this indicates the first Monday on or after the 5th day of the
 startMonth.
 Day of week before day of month. To specify the last day of the week
 occurring on or before an exact day of the month, make the day of the
 week and the day of the month negative. For example, if startDay is -21
 and startDayOfWeek is -WEDNESDAY, this indicates the last Wednesday on or
 before the 21st of the startMonth.
 The above examples refer to the startMonth, startDay, and startDayOfWeek;
 the same applies for the endMonth, endDay, and endDayOfWeek.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> rawOffset - The given base time zone offset to GMT.
    <dd> ID - The time zone ID which is obtained from
                        TimeZone.getAvailableIDs.
    <dd> startMonth - The daylight savings starting month. Month is
                        0-based. eg, 0 for January.
    <dd> startDay - The daylight savings starting
                        day-of-week-in-month. Please see the member
                        description for an example.
    <dd> startDayOfWeek - The daylight savings starting day-of-week. Please
                        see the member description for an example.
    <dd> startTime - The daylight savings starting time. Please see the
                        member description for an example.
    <dd> endMonth - The daylight savings ending month. Month is
                        0-based. eg, 0 for January.
    <dd> endDay - The daylight savings ending day-of-week-in-month.
                        Please see the member description for an example.
    <dd> endDayOfWeek - The daylight savings ending day-of-week. Please
                        see the member description for an example.
    <dd> endTime - The daylight savings ending time. Please see the
                        member description for an example.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> the month, day, dayOfWeek, or time
 parameters are out of range for the start or end rule
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setStartYear(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setStartYear"><b>setStartYear</b></a>
<pre>
 public void setStartYear(int year)
</pre>
<dl>
  <dd> Sets the daylight savings starting year.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - The daylight savings starting year.
  </dl></dd>
</dl>
<a name="setStartRule(int, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setStartRule"><b>setStartRule</b></a>
<pre>
 public void setStartRule(int month,
                          int dayOfWeekInMonth,
                          int dayOfWeek,
                          int time)
</pre>
<dl>
  <dd> Sets the daylight savings starting rule. For example, Daylight Savings
 Time starts at the first Sunday in April, at 2 AM in standard time.
 Therefore, you can set the start rule by calling:
 setStartRule(TimeFields.APRIL, 1, TimeFields.SUNDAY, 2*60*60*1000);
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> month - The daylight savings starting month. Month is
                          0-based. eg, 0 for January.
    <dd> dayOfWeekInMonth - The daylight savings starting
                          day-of-week-in-month. Please see the member
                          description for an example.
    <dd> dayOfWeek - The daylight savings starting day-of-week.
                          Please see the member description for an
                          example.
    <dd> time - The daylight savings starting time. Please see
                          the member description for an example.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> the month, dayOfWeekInMonth,
 dayOfWeek, or time parameters are out of range
  </dl></dd>
</dl>
<a name="setEndRule(int, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setEndRule"><b>setEndRule</b></a>
<pre>
 public void setEndRule(int month,
                        int dayOfWeekInMonth,
                        int dayOfWeek,
                        int time)
</pre>
<dl>
  <dd> Sets the daylight savings ending rule. For example, Daylight Savings Time
 ends at the last (-1) Sunday in October, at 2 AM in standard time.
 Therefore, you can set the end rule by calling:
 setEndRule(TimeFields.OCTOBER, -1, TimeFields.SUNDAY, 2*60*60*1000);
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> month - The daylight savings ending month. Month is
                          0-based. eg, 0 for January.
    <dd> dayOfWeekInMonth - The daylight savings ending
                          day-of-week-in-month. Please see the member
                          description for an example.
    <dd> dayOfWeek - The daylight savings ending day-of-week. Please
                          see the member description for an example.
    <dd> time - The daylight savings ending time. Please see the
                          member description for an example.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> the month, dayOfWeekInMonth,
 dayOfWeek, or time parameters are out of range
  </dl></dd>
</dl>
<a name="getOffset(int, int, int, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getOffset"><b>getOffset</b></a>
<pre>
 public int getOffset(int era,
                      int year,
                      int month,
                      int day,
                      int dayOfWeek,
                      int millis)
</pre>
<dl>
  <dd> Overrides TimeZone
 Gets offset, for current date, modified in case of
 daylight savings. This is the offset to add *to* UTC to get local time.
 Gets the time zone offset, for current date, modified in case of daylight
 savings. This is the offset to add *to* UTC to get local time. Assume
 that the start and end month are distinct. This method may return incorrect
 results for rules that start at the end of February (e.g., last Sunday in
 February) or the beginning of March (e.g., March 1).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> era - The era of the given date.
    <dd> year - The year in the given date.
    <dd> month - The month in the given date. Month is 0-based. e.g.,
                      0 for January.
    <dd> day - The day-in-month of the given date.
    <dd> dayOfWeek - The day-of-week of the given date.
    <dd> millis - The milliseconds in day in <em>standard</em> local time.
    <dt> <b>Returns:</b>
    <dd> The offset to add *to* GMT to get local time.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> the era, month, day,
 dayOfWeek, or millis parameters are out of range
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#getOffset(int, int, int, int, int, int)">getOffset</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="getRawOffset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRawOffset"><b>getRawOffset</b></a>
<pre>
 public int getRawOffset()
</pre>
<dl>
  <dd> Overrides TimeZone
 Gets the GMT offset for this time zone.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#getRawOffset()">getRawOffset</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="setRawOffset(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setRawOffset"><b>setRawOffset</b></a>
<pre>
 public void setRawOffset(int offsetMillis)
</pre>
<dl>
  <dd> Overrides TimeZone
 Sets the base time zone offset to GMT.
 This is the offset to add *to* UTC to get local time.
 Please see TimeZone.setRawOffset for descriptions on the parameter.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#setRawOffset(int)">setRawOffset</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="useDaylightTime()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="useDaylightTime"><b>useDaylightTime</b></a>
<pre>
 public boolean useDaylightTime()
</pre>
<dl>
  <dd> Overrides TimeZone
 Queries if this time zone uses Daylight Savings Time.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#useDaylightTime()">useDaylightTime</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="inDaylightTime(java.util.Date)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="inDaylightTime"><b>inDaylightTime</b></a>
<pre>
 public boolean inDaylightTime(<a href="java.util.Date.html#_top_">Date</a> date)
</pre>
<dl>
  <dd> Overrides TimeZone
 Queries if the given date is in Daylight Savings Time.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#inDaylightTime(java.util.Date)">inDaylightTime</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="clone()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="clone"><b>clone</b></a>
<pre>
 public <a href="java.lang.Object.html#_top_">Object</a> clone()
</pre>
<dl>
  <dd> Overrides Cloneable
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.TimeZone.html#clone()">clone</a> in class <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public synchronized int hashCode()
</pre>
<dl>
  <dd> Override hashCode.
 Generates the hash code for the SimpleDateFormat object
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Compares the equality of two SimpleTimeZone objects.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - The SimpleTimeZone object to be compared with.
    <dt> <b>Returns:</b>
    <dd> True if the given obj is the same as this SimpleTimeZone
             object; false otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Return a string representation of this time zone.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this time zone.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.ResourceBundle.html#_top_">Previous</a>  <a href="java.util.Stack.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
