%IsValidTimeZone function


Function

The function checks whether the given text represents a valid time zone.

Declaration
BOOL %IsValidTimeZone(
  TEXT in timeZone
)
Parameters
timeZoneTime zone name.
Description

The function checks whether the given text is a valid time zone name or a valid definition of UTC offset.

Valid names are those defined in Time Zone Database. A compendious list is available on Wikipedia.

Valid definition of UTC offset is text using format "(+|-)hh[:mi[:ss]]", where hh defines the number of hours, mi defines the number of minutes, and ss defines the number of seconds. The sign, as well as the number of hours, are essential parts of offset definition, number of minutes and seconds are optional and default to 0 (e.g. "+02:30" defines offset of 2 hours and 30 minutes from UTC).

Napíšte komentár