Home Search

DriveWorks Solo 24
GetTimeZones

Send Feedback

GetTimeZones

Gets a list of IANA time zones.

The returned list is based on the IANA Database of time zones current at the point of release of DriveWorks 24 (Noda Time - Data version: 2026b).

Subsequent updates to the IANA Database will not be reflected in this version of DriveWorks.

The returned list contains the following information.

  • ID: This is the IANA Zone ID of the time zone (see Noda Time | Time Zones).

    These values are invariant (will never change) regardless of the current date/time or machine (locale and Windows version) running DriveWorks.

  • Display Name: This is the Windows display name of the time zone.

    These values are dynamically generated by Windows, on the machine that DriveWorks (Administrator, User, Autopilot or Live) is running on.

    They cannot be guaranteed to be the same on every machine, locale and Windows version.

    These values can be used for UI purposes but should not be relied on for any consistent results.

  • Offset: The current offset of the time zone from UTC.

    This is dynamically generated at the point of function execution.

    It will always reflect the current offset of that time zone from UTC.

    This value will change, for example when different time zones enter daylight savings.

Syntax

GetTimeZones([Include Etc Zones], [Include UTC Offset Zones])

Where:

Include Etc Zones (optional) is TRUE to include Etc/* time zones. FALSE (default) to exclude.

This specifies whether to include time zones that start with Etc/* these are part of the IANA list for legacy compatibility and do not correspond to any geographic location.

Include UTC Offset Zones (optional) is TRUE to include UTC offset time zones. FALSE (default) to exclude.

This specifies whether to include time zones whose display name is purely a UTC Offset name, these time zones are not normally supported in Windows and therefore do not have a different name.

Examples

Example 1

GetTimeZones()

Returns a table of IANA time zones, with Etc and UTC Offset zones excluded.

Example 1 Result

The result has been filtered for clarity.

{"ID","Display Name","Offset";"Africa/Cairo","Egypt Standard Time","+03:00";"America/Chicago","Central Standard Time","-05:00";"Asia/Shanghai","China Standard Time","+08:00";"Brazil/East","E. South America Standard Time","-03:00";"Canada/Pacific","Pacific Standard Time","-07:00";"Europe/Berlin","W. Europe Standard Time","+02:00";"Europe/Paris","Romance Standard Time","+02:00";"US/Eastern","Eastern Standard Time","-04:00"}

Result viewed as a table

IDDisplay NameOffset
Africa/CairoEgypt Standard Time+03:00
America/ChicagoCentral Standard Time-05:00
Asia/ShanghaiChina Standard Time+08:00
Brazil/EastE. South America Standard Time-03:00
Canada/PacificPacific Standard Time-07:00
Europe/BerlinW. Europe Standard Time+02:00
Europe/ParisRomance Standard Time+02:00
US/EasternEastern Standard Time-04:00

Example 2

GetTimeZones(FALSE, FALSE)

Returns a table of IANA time zones, with Etc and UTC Offset zones excluded.

Example 2 Result

The result has been filtered for clarity.

{"ID","Display Name","Offset";"Africa/Cairo","Egypt Standard Time","+03:00";"America/Chicago","Central Standard Time","-05:00";"Asia/Shanghai","China Standard Time","+08:00";"Brazil/East","E. South America Standard Time","-03:00";"Canada/Pacific","Pacific Standard Time","-07:00";"Europe/Berlin","W. Europe Standard Time","+02:00";"Europe/Paris","Romance Standard Time","+02:00";"US/Eastern","Eastern Standard Time","-04:00"}

Result viewed as a table

IDDisplay NameOffset
Africa/CairoEgypt Standard Time+03:00
America/ChicagoCentral Standard Time-05:00
Asia/ShanghaiChina Standard Time+08:00
Brazil/EastE. South America Standard Time-03:00
Canada/PacificPacific Standard Time-07:00
Europe/BerlinW. Europe Standard Time+02:00
Europe/ParisRomance Standard Time+02:00
US/EasternEastern Standard Time-04:00

Example 3

Filters the list to return only the Time Zones where the offset is -5.

TableFilter(GetTimeZones(),3,"=-05:00",)

Returns a filtered table of IANA time zones, with Etc and UTC Offset zones excluded where column 3 (Offset) equals -05:00.

Example 3 Result

The result has been filtered for clarity.

{"ID","Display Name","Offset"; "America/Cancun","Eastern Standard Time (Mexico)","-05:00"; "America/Chicago","Central Standard Time","-05:00"; "America/Indiana/Knox","Central Standard Time","-05:00"; "America/Winnipeg","Central Standard Time","-05:00"; "Canada/Central","Central Standard Time","-05:00"; "US/Central","Central Standard Time","-05:00"}

Result viewed as a table

IDDisplay NameOffset
America/CancunEastern Standard Time (Mexico)-05:00
America/ChicagoCentral Standard Time-05:00
America/Indiana/KnoxCentral Standard Time-05:00
America/WinnipegCentral Standard Time-05:00
Canada/CentralCentral Standard Time-05:00
US/CentralCentral Standard Time-05:00

See Also

ConvertFromUtc

ConvertToUtc