Home Reference Source
public class | source

SystemDefaultZoneId

Extends:

ZoneId → SystemDefaultZoneId

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

equals(other: *): boolean

public

id(): string

public

rules(): *

Inherited Summary

From class ZoneId
public static

Obtains an instance of ZoneId from a temporal object.

public static

getAvailableZoneIds(): string[]

Gets the set of available zone IDs.

public static

of(zoneId: string): ZoneId

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

public static

ofOffset(prefix: string, offset: ZoneOffset): ZoneId

Obtains an instance of ZoneId wrapping an offset.

public static

Gets the system default time-zone.

public

equals(other: *): boolean

Checks if this time-zone ID is equal to another time-zone ID.

public

hashCode(): number

A hash code for this time-zone ID.

public

id(): String

Gets the unique time-zone ID.

public

Normalizes the time-zone ID, returning a ZoneOffset where possible.

public

Gets the time-zone rules for this ID allowing calculations to be performed.

public

toJSON(): string

toJSON() use by JSON.stringify delegates to toString()

public

toString(): string

Outputs this zone as a string, using the ID.

Public Constructors

public constructor() source

Public Methods

public equals(other: *): boolean source

Checks if this time-zone ID is equal to another time-zone ID.

The comparison is based on the ID.

Override:

ZoneId#equals

Params:

NameTypeAttributeDescription
other *

Return:

boolean

public id(): string source

Gets the unique time-zone ID.

This ID uniquely defines this object. The format of an offset based ID is defined by ZoneOffset#getId.

Override:

ZoneId#id

Return:

string

public rules(): * source

Gets the time-zone rules for this ID allowing calculations to be performed.

The rules provide the functionality associated with a time-zone, such as finding the offset for a given instant or local date-time.

A time-zone can be invalid if it is deserialized in a Java Runtime which does not have the same rules loaded as the Java Runtime that stored it. In this case, calling this method will throw a ZoneRulesException.

The rules are supplied by ZoneRulesProvider. An advanced provider may support dynamic updates to the rules without restarting the Java Runtime. If so, then the result of this method may change over time. Each individual call will be still remain thread-safe.

ZoneOffset will always return a set of rules where the offset never changes.

Override:

ZoneId#rules

Return:

*