TimeZone

Description:              This function returns information on the current time zone setting of the machine.

Returns:                    Varies

Usage:                       Script

Format:                      TimeZone(Option)

Parameters:             Option     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the information to return as follows:

Option

Returns

0

Time displacement in seconds from UTC

1

Name of time zone (maximum of 32 characters) in "Daylight Time" or "Standard Time", which ever is applicable.  Commonly used for display purposes.

2

Name of time zone (maximum of 32 characters) in "Standard Time" only.  Commonly used as an input to ConverTimestamp.

 

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).

Example:

If 1 Main;

[

  msg = Concat("It is now ", CurrentTime(), " ", TimeZone(1));

]

See Also:

Date | DateNum | Day | Month | Now | Seconds | CurrentTime | SetClock | Time | Today | Year | ConvertTimestamp | TimeZoneList