DCT Lightfoot v3 API specification

java.util
Class TimeZone

java.lang.Object
  |
  +--java.util.TimeZone
Direct Known Subclasses:
ComplexTimeZone, SimpleTimeZone

public abstract class TimeZone
extends Object


Field Summary
protected static java.lang.String GMT
          GMT timezone name
protected static java.lang.String[] VALID_TZ
          Valid timezones
 
Constructor Summary
TimeZone()
          Create a new timezone
 
Method Summary
static java.lang.String[] getAvailableIDs()
          Get the available TimeZone IDs
static TimeZone getDefault()
          Get the default time zone
abstract  java.lang.String getID()
          Get the ID of this time zone
abstract  int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)
          Get the offset to add to GMT to get the local time.
abstract  int getRawOffset()
          Get the raw offset for this time zone
static TimeZone getTimeZone(java.lang.String ID)
          Get the time zone for a given ID
abstract  boolean useDaylightTime()
          Does this time zone use daylight time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GMT

protected static final java.lang.String GMT
GMT timezone name

See Also:
Constant Field Values

VALID_TZ

protected static final java.lang.String[] VALID_TZ
Valid timezones

Constructor Detail

TimeZone

public TimeZone()
Create a new timezone

Method Detail

getAvailableIDs

public static java.lang.String[] getAvailableIDs()
Get the available TimeZone IDs

Returns:
an array of TimeZone IDs

getDefault

public static TimeZone getDefault()
Get the default time zone

Returns:
the default time zone

getID

public abstract java.lang.String getID()
Get the ID of this time zone

Returns:
the ID

getOffset

public abstract int getOffset(int era,
                              int year,
                              int month,
                              int day,
                              int dayOfWeek,
                              int millis)
Get the offset to add to GMT to get the local time.

Parameters:
era - The era of the date (0 = BC, 1 = AD)
year - The year of the given date
month - The month of the given date
day - The day of the month of the given date
dayOfWeek - The day of the week of the given date
millis - The milliseconds in the day in standard local time
Returns:
The offset to add to GMT to get local time
Throws:
IllegalArgumentException - if any of the parameters are out of range

getRawOffset

public abstract int getRawOffset()
Get the raw offset for this time zone

Returns:
the GMT offset for this time zone

getTimeZone

public static TimeZone getTimeZone(java.lang.String ID)
Get the time zone for a given ID

Parameters:
ID - the time zone string
Returns:
the TimeZone

useDaylightTime

public abstract boolean useDaylightTime()
Does this time zone use daylight time

Returns:
true if it does

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification