TimeZone

Use this function to return the system’s time zone setting or to make sure a time zone is valid.

Syntax

TimeZone (TimeZone)

Parameter

Description

TimeZone

(Optional) If you include a time zone string, the system makes sure that string is valid. If it is invalid, the system returns an empty string.

The default is to return the system’s current time zone setting.

Example

Here are some examples:

This example returns the system time zone, such as America/New_York:

T1 = TimeZone()

This example checks to see if a time zone string, such as Europe/London, is valid:

T1 = 'Europe/London'

T2 = TimeZone(T1)

if (T2 = '') then

Print_It(T1 & 'is not a valid time zone string')

else

Print_It(T1 & 'is a valid time zone string')

end

See also