org.threeten.bp

ZoneId

object ZoneId extends Serializable

Annotations
@SerialVersionUID( 8352817235686L )
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZoneId
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val SHORT_IDS: Map[String, String]

    A map of zone overrides to enable the short time-zone names to be used.

    A map of zone overrides to enable the short time-zone names to be used.

    Use of short zone IDs has been deprecated in java.util.TimeZone. This map allows the IDs to continue to be used via the #of(String, Map) factory method.

    This map contains a mapping of the IDs that is in line with TZDB 2005r and later, where 'EST', 'MST' and 'HST' map to IDs which do not include daylight savings.

    This maps as follows:

    • EST - -05:00
    • HST - -10:00
    • MST - -07:00
    • ACT - Australia/Darwin
    • AET - Australia/Sydney
    • AGT - America/Argentina/Buenos_Aires
    • ART - Africa/Cairo
    • AST - America/Anchorage
    • BET - America/Sao_Paulo
    • BST - Asia/Dhaka
    • CAT - Africa/Harare
    • CNT - America/St_Johns
    • CST - America/Chicago
    • CTT - Asia/Shanghai
    • EAT - Africa/Addis_Ababa
    • ECT - Europe/Paris
    • IET - America/Indiana/Indianapolis
    • IST - Asia/Kolkata
    • JST - Asia/Tokyo
    • MIT - Pacific/Apia
    • NET - Asia/Yerevan
    • NST - Pacific/Auckland
    • PLT - Asia/Karachi
    • PNT - America/Phoenix
    • PRT - America/Puerto_Rico
    • PST - America/Los_Angeles
    • SST - Pacific/Guadalcanal
    • VST - Asia/Ho_Chi_Minh

    The map is unmodifiable.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def from(temporal: TemporalAccessor): ZoneId

    Obtains an instance of ZoneId from a temporal object.

    Obtains an instance of ZoneId from a temporal object.

    A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of ZoneId.

    The conversion will try to obtain the zone in a way that favours region-based zones over offset-based zones using TemporalQueries#zone().

    This method matches the signature of the functional interface TemporalQuery allowing it to be used in queries via method reference, ZoneId::from.

    temporal

    the temporal object to convert, not null

    returns

    the zone ID, not null

    Exceptions thrown
    DateTimeException

    if unable to convert to a { @code ZoneId}

  13. def getAvailableZoneIds: Set[String]

    Gets the set of available zone IDs.

    Gets the set of available zone IDs.

    This set includes the string form of all available region-based IDs. Offset-based zone IDs are not included in the returned set. The ID can be passed to #of(String) to create a ZoneId.

    The set of zone IDs can increase over time, although in a typical application the set of IDs is fixed. Each call to this method is thread-safe.

    returns

    a modifiable copy of the set of zone IDs, not null

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def of(zoneId: String): ZoneId

    Obtains an instance of ZoneId from an ID ensuring that the ID is valid and available for use.

    Obtains an instance of ZoneId from an ID ensuring that the ID is valid and available for use.

    This method parses the ID producing a ZoneId or ZoneOffset. A ZoneOffset is returned if the ID is 'Z', or starts with '+' or '-'. The result will always be a valid ID for which ZoneRules can be obtained.

    Parsing matches the zone ID step by step as follows.

    • If the zone ID equals 'Z', the result is ZoneOffset.UTC.
    • If the zone ID consists of a single letter, the zone ID is invalid and DateTimeException is thrown.
    • If the zone ID starts with '+' or '-', the ID is parsed as a ZoneOffset using ZoneOffset#of(String).
    • If the zone ID equals 'GMT', 'UTC' or 'UT' then the result is a ZoneId with the same ID and rules equivalent to ZoneOffset.UTC.
    • If the zone ID starts with 'UTC+', 'UTC-', 'GMT+', 'GMT-', 'UT+' or 'UT-' then the ID is a prefixed offset-based ID. The ID is split in two, with a two or three letter prefix and a suffix starting with the sign. The suffix is parsed as a ZoneOffset#of(String) ZoneOffset. The result will be a ZoneId with the specified UTC/GMT/UT prefix and the normalized offset ID as per ZoneOffset#getId(). The rules of the returned ZoneId will be equivalent to the parsed ZoneOffset.
    • All other IDs are parsed as region-based zone IDs. Region IDs must match the regular expression [A-Za-z][A-Za-z0-9~/._+-]+ otherwise a DateTimeException is thrown. If the zone ID is not in the configured set of IDs, ZoneRulesException is thrown. The detailed format of the region ID depends on the group supplying the data. The default set of data is supplied by the IANA Time Zone Database (TZDB). This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'. This is compatible with most IDs from java.util.TimeZone.
    zoneId

    the time-zone ID, not null

    returns

    the zone ID, not null

    Exceptions thrown
    DateTimeException

    if the zone ID has an invalid format

    ZoneRulesException

    if the zone ID is a region ID that cannot be found

  21. def of(zoneId: String, aliasMap: Map[String, String]): ZoneId

    Obtains an instance of ZoneId using its ID using a map of aliases to supplement the standard zone IDs.

    Obtains an instance of ZoneId using its ID using a map of aliases to supplement the standard zone IDs.

    Many users of time-zones use short abbreviations, such as PST for 'Pacific Standard Time' and PDT for 'Pacific Daylight Time'. These abbreviations are not unique, and so cannot be used as IDs. This method allows a map of string to time-zone to be setup and reused within an application.

    zoneId

    the time-zone ID, not null

    aliasMap

    a map of alias zone IDs (typically abbreviations) to real zone IDs, not null

    returns

    the zone ID, not null

    Exceptions thrown
    DateTimeException

    if the zone ID has an invalid format

    ZoneRulesException

    if the zone ID is a region ID that cannot be found

  22. def ofOffset(prefix: String, offset: ZoneOffset): ZoneId

    Obtains an instance of ZoneId wrapping an offset.

    Obtains an instance of ZoneId wrapping an offset.

    If the prefix is "GMT", "UTC", or "UT" a ZoneId with the prefix and the non-zero offset is returned. If the prefix is empty "" the ZoneOffset is returned.

    prefix

    the time-zone ID, not null

    offset

    the offset, not null

    returns

    the zone ID, not null

    Exceptions thrown
    IllegalArgumentException

    if the prefix is not one of "GMT", "UTC", or "UT", or ""

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def systemDefault: ZoneId

    Gets the system default time-zone.

    Gets the system default time-zone.

    This queries TimeZone#getDefault() to find the default time-zone and converts it to a ZoneId. If the system default time-zone is changed, then the result of this method will also change.

    returns

    the zone ID, not null

    Exceptions thrown
    DateTimeException

    if the converted zone ID has an invalid format

    ZoneRulesException

    if the converted zone region ID cannot be found

  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped