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
});
<!-- Load Timezone -->
<script src="index.js"></script>

<script>
// Create Timezone
am5.Timezone.new(root, {
  // ... config if applicable
});
</script>

Inheritance

Timezone does not extend any other symbol.

Timezone is not extended by any other symbol.

Settings

Timezone does not have any settings.

Private settings

Timezone does not have any private settings.

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

)

#

Static

Returns T

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

Click here for more info

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.