Object Type: Zone

Read Only

Abstract object representation to handle time zones.

Methods

fixedOffset

If always at a fixed offset from Utc, then this function returns it; otherwise nil.

utcFromCivil

Converts a given Civil value to an Utc timestamp based on the time zone value.

utcToCivil

Converts a given Utc timestamp to a Civil value based on the time zone value.

fixedOffset

function fixedOffset() returns ZoneOffset?
Isolated Function

If always at a fixed offset from Utc, then this function returns it; otherwise nil.

Return Type

(ZoneOffset?)

The fixed zone offset or nil

utcFromCivil

function utcFromCivil(Civil civil) returns Utc | Error
Isolated Function

Converts a given Civil value to an Utc timestamp based on the time zone value.

Parameters

Return Type

(Utc | Error)

The corresponding Utc value or an error if civil.timeAbbrev is missing

utcToCivil

function utcToCivil(Utc utc) returns Civil
Isolated Function

Converts a given Utc timestamp to a Civil value based on the time zone value.

Parameters

  • utc Utc
  • Utc timestamp

Return Type

(Civil)

The corresponding Civil value