Is used to get information about the time zone:

const  timezoneDefault = await System.timezones.default;

Hierarchy

  • TTimezones

Properties

Readonly UTC

Time zone in relation to UTC.

Example:

const timezoneUTC = await System.timezones.UTC;

current

current: TTimezone

Current time zone.

The time zone that the script works with. By default, it is the company’s time zone. Example:

const timezoneСurrent = await System. timezones.current;

You can change the current time zone for a script.
Then all further operations with dates will be executed based on this time zone.

System.timezones.current = timezoneSamara;

Readonly default

default: TTimezone

Company’s time zone.

Example:

const timezoneDefault = await  System.timezones.default;

Methods

all

  • all(isWinterTime?: undefined | false | true): TTimezone[]
  • List of time zones.

    Example:

    const allTimezones = await System.timezones.all();
    const timezones = allTimezones.filter(tz => tz.name === 'Europe/Samara');  
    const timezoneSamara = timezones[0]; 
    

    If isWinterTime is not set, the time offset will be counted from the current date; true is for winter time, and false is for summer time. You can look up the name of the time zone you need in the global tz database .

    Parameters

    • Optional isWinterTime: undefined | false | true

    Returns TTimezone[]