All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SimpleTimeZone

  • Field Summary

    Fields

    static final int

    A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."

    static final int

    A style specifier for getDisplayName() indicating a short name, such as "PST."

  • Constructor Summary

    Constructors

  • Method Summary

    Returns a stream of the available IDs supported.

    availableIDs(int rawOffset)

    Gets the available IDs according to the given time zone offset in milliseconds.

    clone()

    Creates a copy of this TimeZone.

    Returns an array of the available IDs supported.

    getAvailableIDs(int rawOffset)

    Gets the available IDs according to the given time zone offset in milliseconds.

    Gets the default TimeZone of the Java virtual machine.

    Returns a long standard time name of this TimeZone suitable for presentation to the user in the default locale.

    getDisplayName(boolean daylight, int style)

    Returns a name in the specified style of this TimeZone suitable for presentation to the user in the default locale.

    getDisplayName(boolean daylight, int style, Locale locale)

    Returns a name in the specified style of this TimeZone suitable for presentation to the user in the specified locale.

    Returns a long standard time name of this TimeZone suitable for presentation to the user in the specified locale.

    int

    Returns the amount of time to be added to local standard time to get local wall clock time.

    getID()

    Gets the ID of this time zone.

    abstract int

    getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)

    Gets the time zone offset, for current date, modified in case of daylight savings.

    int

    getOffset(long date)

    Returns the offset of this time zone from UTC at the specified date.

    abstract int

    Returns the amount of time in milliseconds to add to UTC to get standard time in this time zone.

    Gets the TimeZone for the given ID.

    Gets the TimeZone for the given zoneId.

    boolean

    Returns true if this zone has the same rule and offset as another zone.

    abstract boolean

    Queries if the given date is in Daylight Saving Time in this time zone.

    boolean

    Returns true if this TimeZone is currently in Daylight Saving Time, or if a transition from Standard Time to Daylight Saving Time occurs at any future time.

    static void

    Sets the TimeZone that is returned by the getDefault method.

    void

    abstract void

    setRawOffset(int offsetMillis)

    Sets the base time zone offset to GMT.

    toZoneId()

    Converts this TimeZone object to a ZoneId.

    abstract boolean

    Queries if this TimeZone uses Daylight Saving Time.

    Methods declared in class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    boolean

    Indicates whether some other object is "equal to" this one.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    int

    Returns a hash code value for this object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    Returns a string representation of the object.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Field Details

    • SHORT

    • LONG

  • Constructor Details

    • TimeZone

  • Method Details

    • getOffset

    • getOffset

    • setRawOffset

    • getRawOffset

    • getID

    • setID

    • getDisplayName

    • getDisplayName

    • getDisplayName

    • getDisplayName

    • getDSTSavings

    • useDaylightTime

    • observesDaylightTime

    • inDaylightTime

    • getTimeZone

    • getTimeZone

    • toZoneId

    • getAvailableIDs

    • getAvailableIDs

    • availableIDs

    • availableIDs

    • getDefault

    • setDefault

    • hasSameRules

    • clone