Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Timezone

A timezone.

author

"Travis Redpath"

Hierarchy

  • Timezone

Index

Constructors

constructor

  • Construct a new timezone.

    Returns Timezone

Properties

Private _offset

_offset: Duration

The offset from GMT.

dst

dst: boolean = false

Is the timezone currently in daylight savings time.

value

value: number

Optional value of the timezone. If set to a valid value, the offset will be looked up once the job is submitted so {@link Timezone#offset} and {@link Timezone#dst} will be ignored. Valid values can be obtained by calling {@link Timezone#getTimezoneList()}.

Static Private Readonly PARAM_TIMEZONE

PARAM_TIMEZONE: "timezone" = "timezone"

Accessors

offset

  • Get the offset from GMT.

    Returns Duration

  • Set the offset from GMT.

    Parameters

    Returns void

Methods

checkValid

isValid

  • isValid(): boolean
  • Is the timezone valid.

    Returns boolean

stream

  • stream(builder: Socket): void
  • Streams the timezone to a socket.

    Parameters

    • builder: Socket

      A socket connection to stream to.

    Returns void

Static Private ParseTimezone

Static getTimezoneList

  • getTimezoneList(callback?: (defaults: string) => any): void
  • Gets a list of the possible time zones from Java. The list is combined into a single string with name/value pairs separated by a '|'.

    deprecated

    Use {@link Timezone#getTimezoneNameList()} instead.

    Parameters

    • Optional callback: (defaults: string) => any
        • (defaults: string): any
        • Parameters

          • defaults: string

          Returns any

    Returns void

Static getTimezoneListPromise

  • getTimezoneListPromise(): Promise<string>
  • Gets a list of the possible time zones from Java. The list is combined into a single string with name/value pairs separated by a '|'.

    deprecated

    Use {@link Timezone#getTimezoneNameListPromise()} instead.

    Returns Promise<string>

    The list of timezone names and their UTC offsets in a single string separated by '|'.

Static getTimezoneNameList

  • getTimezoneNameList(callback?: (defaults: TimezoneName[]) => any): void
  • Gets a list of possible time zones from Java.

    Parameters

    Returns void

    An array of timezone names.

Static getTimezoneNameListPromise

  • Gets a list of possible time zones from Java.

    Returns Promise<TimezoneName[]>

    An array of timezone names.