Uses of Class java.util.TimeZone (Java SE 15 & JDK 15)
Description: use: module: java.base, package: java.util, class: TimeZone

# Uses of Class
java.util.TimeZone

Packages that use TimeZone
Package | Description
--- | ---
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
javax.xml.datatype | Defines XML/Java Type Mappings.

- ## Uses of TimeZone in java.text

  Methods in java.text that return TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `TimeZone` | DateFormat.`getTimeZone()` | Gets the time zone.

  Methods in java.text with parameters of type TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | DateFormat.`setTimeZone​(TimeZone zone)` | Sets the time zone for the calendar of this `DateFormat` object.

- ## Uses of TimeZone in java.util

  Subclasses of TimeZone in java.util
  Modifier and Type | Class | Description
  --- | --- | ---
  `class` | `SimpleTimeZone` | `SimpleTimeZone` is a concrete subclass of `TimeZone` that represents a time zone for use with a Gregorian calendar.

  Methods in java.util that return TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `static TimeZone` | TimeZone.`getDefault()` | Gets the default `TimeZone` of the Java virtual machine.
  `TimeZone` | Calendar.`getTimeZone()` | Gets the time zone.
  `static TimeZone` | TimeZone.`getTimeZone​(String ID)` | Gets the `TimeZone` for the given ID.
  `static TimeZone` | TimeZone.`getTimeZone​(ZoneId zoneId)` | Gets the `TimeZone` for the given `zoneId`.

  Methods in java.util with parameters of type TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `static Calendar` | Calendar.`getInstance​(TimeZone zone)` | Gets a calendar using the specified time zone and default locale.
  `static Calendar` | Calendar.`getInstance​(TimeZone zone, Locale aLocale)` | Gets a calendar with the specified time zone and locale.
  `boolean` | SimpleTimeZone.`hasSameRules​(TimeZone other)` | Returns `true` if this zone has the same rules and offset as another zone.
  `boolean` | TimeZone.`hasSameRules​(TimeZone other)` | Returns true if this zone has the same rule and offset as another zone.
  `static void` | TimeZone.`setDefault​(TimeZone zone)` | Sets the `TimeZone` that is returned by the `getDefault` method.
  `Calendar.Builder` | Calendar.Builder.`setTimeZone​(TimeZone zone)` | Sets the time zone parameter to the given `zone`.
  `void` | Calendar.`setTimeZone​(TimeZone value)` | Sets the time zone with the given time zone value.

  Constructors in java.util with parameters of type TimeZone
  Constructor | Description
  --- | ---
  `Calendar​(TimeZone zone, Locale aLocale)` | Constructs a calendar with the specified time zone and locale.
  `GregorianCalendar​(TimeZone zone)` | Constructs a `GregorianCalendar` based on the current time in the given time zone with the default `FORMAT` locale.
  `GregorianCalendar​(TimeZone zone, Locale aLocale)` | Constructs a `GregorianCalendar` based on the current time in the given time zone with the given locale.

- ## Uses of TimeZone in javax.xml.datatype

  Methods in javax.xml.datatype that return TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `abstract TimeZone` | XMLGregorianCalendar.`getTimeZone​(int defaultZoneoffset)` | Returns a `java.util.TimeZone` for this class.

  Methods in javax.xml.datatype with parameters of type TimeZone
  Modifier and Type | Method | Description
  --- | --- | ---
  `abstract GregorianCalendar` | XMLGregorianCalendar.`toGregorianCalendar​(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)` | Convert this `XMLGregorianCalendar` along with provided parameters to a `GregorianCalendar` instance.