Returns time zones known to the current system.
TimeZoneList([options])
(n) options [optional] number that determines the return type and contents. See below.
(s/a) Array, delimited list, or string containing one or more time zone IDs (names.)
TimeZoneList retrieves the time zone IDs available on the current system. Time zone IDs are usually the long text name. For example, "Pacific Standard Time" is the ID for the time zone on the western edge of the 48 contiguous states of the USA.
The options parameter defaults to 0 or you can choose use one of the following values.
Value |
Meaning |
0 |
Return a tab (@tab) delimited list of known time zone ids. This is the default option when the parameter is not supplied. |
1 |
Return a rank-one WIL array of known time zone ids. |
2 |
Return a string containing the current local time zone id. |
; Find all time zones that start with "pacific" and "time" in the name. TzPacific = '' Start = 1 Term = 'Pacific*Time' ; Get a tab delimited list of time zones. TzList = TimeZoneList() Item = ItemLocateWild(Term,TzList,@tab, Start) While Item TzPacific = ItemInsert( ItemExtract(Item, TzList, @tab), -1, TzPacific, @lf) Start = Item + 1 Item = ItemLocateWild(Term,TzList,@tab, Start) EndWhile Message('Pacific * Time - Time Zones', TzPacific)
; Get the current local time zone. Local = TimeZoneList(2) Message("My Time Zone", Local)