Skip to main content

Interface: ITimezoneApi

Charting Library.ITimezoneApi

Methods​

availableTimezones​

availableTimezones(): readonly TimezoneInfo[]

Array of supported TimezoneInfo

Returns​

readonly TimezoneInfo[]


getTimezone​

getTimezone(): TimezoneInfo

Returns the current TimezoneInfo

Returns​

TimezoneInfo


onTimezoneChanged​

onTimezoneChanged(): ISubscription<(timezone: TimezoneId) => void>

To be notified when the timezone is changed

Returns​

ISubscription<(timezone: TimezoneId) => void>

timezoneApi.onTimezoneChanged().subscribe(
null,
timezone => console.log(`New timezone: ${timezone}`),
true
);

setTimezone​

setTimezone(timezone, options?): void

Sets the current timezone

Parameters​

NameType
timezoneTimezoneId | CustomTimezoneId
options?UndoOptions