TimeZone

(Engine-Level Function)

Description: Returns information on the current time zone setting of the machine.
Returns: Varies
Usage: Script only.
Function Groups: Time and Date
Related to: Date | DateNum | Day | Month | Now | Seconds | CurrentTime | SetClock | Time | Today | Year | ConvertTimeStamp | TimeZoneList
Format: TimeZone(Option)
Parameters:  
Option
Required. Any numeric expression giving the information to return as follows:

Option

Returns

0

Time displacement in seconds to UTC

1

Name of time zone (maximum of 32 characters) in "Daylight Time" or "Standard Time", which ever is applicable. The language used will match the user's locale as configured in Windows.

2

Name of time zone (maximum of 32 characters) in "Standard Time" only. The name is given in English only, making this suitable as an input to ConvertTimestamp.

Commonly used for display purposes.

3

A structure of time zone information:
StdTimeZone (Standard time zone)
ObservesDST (Boolean indicating Daylight Savings Time usage when true)

The time zone name is returned in English only, making this suitable as an input to ConvertTimestamp.

Comments: Note that the first two options take account of whether daylight savings is in effect (assuming that that option has been selected on the machine). This means that not only the numeric time displacement, but also the name ("Daylight Time" versus "Standard Time") will vary according to the current date.
The output from the third option (2) is commonly used as an input to the ConvertTimestamp function since that function cannot use the adjusted timezone string from TimeZone(1). Only English is recognized.

Example:

If 1 Main;
[
  msg = Concat("It is now ", CurrentTime(), " ", TimeZone(1));
]