Used to get information about a time zone:

const  timezoneDefault = System.timezones.default;

Hierarchy

  • TTimezones

Properties

Readonly UTC

Time zone in relation to UTC.

Example:

const timezoneUTC = System.timezones.UTC;

current

current: TTimezone

Current time zone.

The time zone the script works with. By default it matches the company time zone. Usage example:

const timezoneСurrent = System. timezones.current;

You can change the current time zone for executing a script. Then all further operations with dates will take into account this particular zone.

System.timezones.current =  timezoneBerlin;

Readonly default

default: TTimezone

Company’s time zone.

Example:

const timezoneDefault = System.timezones.default;

Methods

all

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

    Example:

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

    If isWinterTime is not set, the time offset will be counted from the current date. The valuetrue 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[]