<!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.TimeZone
</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.StringTokenizer.html#_top_">Previous</a>  <a href="java.util.Vector.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.util.TimeZone
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.util.TimeZone
</pre>
<hr>
<dl>
  <dt> public abstract class <b>TimeZone</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>, <a href="java.lang.Cloneable.html#_top_">Cloneable</a>
</dl>
<code>TimeZone</code> represents a time zone offset, and also figures out daylight
 savings.
 <p>
 Typically, you get a <code>TimeZone</code> using <code>getDefault</code>
 which creates a <code>TimeZone</code> based on the time zone where the program
 is running. For example, for a program running in Japan, <code>getDefault</code>
 creates a <code>TimeZone</code> object based on Japanese Standard Time.
 <p>
 You can also get a <code>TimeZone</code> using <code>getTimeZone</code> along
 with a time zone ID. For instance, the time zone ID for the Pacific
 Standard Time zone is "PST". So, you can get a PST <code>TimeZone</code> object
 with:
 <blockquote>
 <pre>
 TimeZone tz = TimeZone.getTimeZone("PST");
 </pre>
 </blockquote>
 You can use <code>getAvailableIDs</code> method to iterate through
 all the supported time zone IDs. You can then choose a
 supported ID to get a favorite <code>TimeZone</code>.
<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.SimpleTimeZone.html#_top_">SimpleTimeZone</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="#TimeZone()"><b>TimeZone</b></a>()
  <dd> 
</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/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAvailableIDs()"><b>getAvailableIDs</b></a>()
  <dd>  Gets all the available IDs supported.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAvailableIDs(int)"><b>getAvailableIDs</b></a>(int)
  <dd>  Gets the available IDs according to the given time zone offset.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDefault()"><b>getDefault</b></a>()
  <dd>  Gets the default TimeZone for this host.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getID()"><b>getID</b></a>()
  <dd>  Gets the ID of this time zone.
  <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>  Gets the time zone 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>  Gets unmodified offset, NOT modified in case of daylight savings.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimeZone(java.lang.String)"><b>getTimeZone</b></a>(String)
  <dd>  Gets the TimeZone for the given ID.
  <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>  Queries if the given date is in Daylight Savings Time in
 this time zone.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDefault(java.util.TimeZone)"><b>setDefault</b></a>(TimeZone)
  <dd>  Sets time zone to using the given TimeZone.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setID(java.lang.String)"><b>setID</b></a>(String)
  <dd>  Sets the time zone ID.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setRawOffset(int)"><b>setRawOffset</b></a>(int)
  <dd>  Sets the base time zone offset to GMT.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#useDaylightTime()"><b>useDaylightTime</b></a>()
  <dd>  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="TimeZone"></a>
<a name="TimeZone()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>TimeZone</b>
<pre>
 public TimeZone()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<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 abstract int getOffset(int era,
                               int year,
                               int month,
                               int day,
                               int dayOfWeek,
                               int milliseconds)
</pre>
<dl>
  <dd> 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.
<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> milliseconds - the millis in day in <em>standard</em> local time.
    <dt> <b>Returns:</b>
    <dd> the offset to add *to* GMT to get local time.
  </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 abstract void setRawOffset(int offsetMillis)
</pre>
<dl>
  <dd> Sets the base time zone offset to GMT.
 This is the offset to add *to* UTC to get local time.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offsetMillis - the given base time zone offset to GMT.
  </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 abstract int getRawOffset()
</pre>
<dl>
  <dd> Gets unmodified offset, NOT modified in case of daylight savings.
 This is the offset to add *to* UTC to get local time.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the unmodified offset to add *to* UTC to get local time.
  </dl></dd>
</dl>
<a name="getID()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getID"><b>getID</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getID()
</pre>
<dl>
  <dd> Gets the ID of this time zone.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the ID of this time zone.
  </dl></dd>
</dl>
<a name="setID(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setID"><b>setID</b></a>
<pre>
 public void setID(<a href="java.lang.String.html#_top_">String</a> ID)
</pre>
<dl>
  <dd> Sets the time zone ID. This does not change any other data in
 the time zone object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ID - the new time zone ID.
  </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 abstract boolean useDaylightTime()
</pre>
<dl>
  <dd> Queries if this time zone uses Daylight Savings Time.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if this time zone uses Daylight Savings Time,
 false, otherwise.
  </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 abstract boolean inDaylightTime(<a href="java.util.Date.html#_top_">Date</a> date)
</pre>
<dl>
  <dd> Queries if the given date is in Daylight Savings Time in
 this time zone.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> date - the given Date.
    <dt> <b>Returns:</b>
    <dd> true if the given date is in Daylight Savings Time,
 false, otherwise.
  </dl></dd>
</dl>
<a name="getTimeZone(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimeZone"><b>getTimeZone</b></a>
<pre>
 public static synchronized <a href="#_top_">TimeZone</a> getTimeZone(<a href="java.lang.String.html#_top_">String</a> ID)
</pre>
<dl>
  <dd> Gets the TimeZone for the given ID.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ID - the given ID.
    <dt> <b>Returns:</b>
    <dd> a TimeZone, or null if the given ID is not recognized.
  </dl></dd>
</dl>
<a name="getAvailableIDs(int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAvailableIDs"><b>getAvailableIDs</b></a>
<pre>
 public static synchronized <a href="java.lang.String.html#_top_">String</a>[] getAvailableIDs(int rawOffset)
</pre>
<dl>
  <dd> Gets the available IDs according to the given time zone offset.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> rawOffset - the given time zone GMT offset.
    <dt> <b>Returns:</b>
    <dd> an array of IDs, where the time zone for that ID has
 the specified GMT offset. For example, "America/Phoenix" and "America/Denver"
 both have GMT-07:00, but differ in daylight savings behavior.
  </dl></dd>
</dl>
<a name="getAvailableIDs()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAvailableIDs"><b>getAvailableIDs</b></a>
<pre>
 public static synchronized <a href="java.lang.String.html#_top_">String</a>[] getAvailableIDs()
</pre>
<dl>
  <dd> Gets all the available IDs supported.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an array of IDs.
  </dl></dd>
</dl>
<a name="getDefault()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDefault"><b>getDefault</b></a>
<pre>
 public static synchronized <a href="#_top_">TimeZone</a> getDefault()
</pre>
<dl>
  <dd> Gets the default TimeZone for this host.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a default TimeZone.
  </dl></dd>
</dl>
<a name="setDefault(java.util.TimeZone)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDefault"><b>setDefault</b></a>
<pre>
 public static synchronized void setDefault(<a href="#_top_">TimeZone</a> zone)
</pre>
<dl>
  <dd> Sets time zone to using the given TimeZone.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> zone - the given time zone.
  </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.lang.Object.html#clone()">clone</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.StringTokenizer.html#_top_">Previous</a>  <a href="java.util.Vector.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
