Skip to main content
Version: v26

ITimezoneApi

Interface

Methods

availableTimezones

Array of supported TimezoneInfo

Signature

availableTimezones() => readonly TimezoneInfo[]

Returns

readonly TimezoneInfo[]


getTimezone

Returns the current TimezoneInfo

Signature

getTimezone() => TimezoneInfo

Returns

TimezoneInfo


onTimezoneChanged

To be notified when the timezone is changed

Example:

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

Signature

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

Returns

ISubscription<(timezone: TimezoneId) => void>


setTimezone

Sets the current timezone

Signature

setTimezone(timezone: TimezoneId | CustomTimezoneId, options?: UndoOptions) => void

Parameters

NameType
timezoneTimezoneId | CustomTimezoneId
options?UndoOptions

Returns

void