Developer Documentation Library > UNICOM Intelligence Function Library > Date and time functions > SetTimeZone
 
SetTimeZone
Sets the time zone associated with a program.
Syntax
SetTimeZone(<value>)
Parameters
<value>
Type: None
Long or Text value specifying time zone to use.
(return)
Type: Long
Index of the new time zone.
Notes
This function changes the time zone associated with the program in which the function is called, as specified by <value>. By default, the program's time zone is the local time zone of the server.
If <value> is a Long value, it is the index value of a time zone defined in the registry on the server.
If <value> is a Text value, it is the name of a time zone defined in the registry on the server.
If <value> is NULL or empty, the time zone associated with the program is not changed.
If a time zone name is used, it is case-insensitive.
The special values of -1 and “UTC” can be used for the time zone; these do not correspond to anything in the registry, but instead refer to UTC time, with no offset or daylight saving defined.
If <value> is any other type, an error occurs.
If the time zone specified by <value> is not in the registry, an error occurs.
See also
DateAdd
Date and time functions