Skip to content

Timezone

Type class

A named timezone, such as "America/New_York", used for root.timezone.

Sources

Timezone can be used (imported) via one of the following packages.

// Import Timezone
import * as am5 from "@amcharts/amcharts5";
// Create Timezone
am5.Timezone.new(root, {
// ... config if applicable
});

Inheritance

Timezone does not extend any other symbol.

Timezone is not extended by any other symbol.

Properties

name

Type string | undefined

The IANA name of the timezone.

Methods

constructor(timezone: string | undefined,
isReal: boolean
)

Returns Timezone

convertLocal(date: Date)

Returns Date

Returns a copy of date shifted so that its local time reads as the time in this timezone.

new(timezone: string | undefined)

StaticReturns T

Creates a timezone from its IANA name, such as "America/New_York".

More info: Getting started: new element syntax

offsetUTC(date: Date)

Returns number

Returns the timezone's offset from UTC at date, in minutes, signed as Date.getTimezoneOffset() is: positive west of UTC.

parseDate(date: Date)

Returns ParsedDate

Returns the parts of date as seen in this timezone: year, month (from 0), day, hour, minute, second, millisecond and weekday (0 for Sunday).

Events

Timezone does not have any events.