The time-zone ID representing EAT (Eastern Africa Time), with an ID of 'Africa/Nairobi'.
The time-zone ID representing UTC (Coordinated Universal Time), with an ID of 'Z'.
Tries to obtain a ZoneId wrapping an offset.
Tries to obtain a 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.
Similar to apply(zone: String)
, but allows supplementing the existing ZoneIds with a
Map of aliases to real zone IDs.
Tries to obtains a ZoneId or ZoneOffset from text.
Tries to obtains a ZoneId or ZoneOffset from text. A ZoneOffset is returned if the text is 'Z', or starts with '+' or '-'. If successful, the result will always be a valid ID for which ZoneRules can be obtained.
the time-zone ID
will return Failure[ZoneRulesException]
if the converted zone region ID cannot be found.
will return Failure[DateTimeException]
if the converted zone ID has an invalid format.
Obtains a scala.collection.immutable.Set of the text form of all currently available region based zone IDs.
Tries to query TimeZone.getDefault() to find the current default time-zone and convert it to a ZoneId.
Tries to query TimeZone.getDefault() to find the current default time-zone and convert it to a ZoneId.
will return Failure[ZoneRulesException]
if the converted zone region ID cannot be found.
will return Failure[DateTimeException]
if the converted zone ID has an invalid format.
Factory object for obtaining instances of ZoneId. Also provides default instances ZoneId.UTC, and ZoneId.EAT which correspond to time zone ids representing Coordinated Universal Time, and East African Time respectively.
In addition to factory methods, ZoneId.entries obtains a Set of all currently available region based zone ids.