Skip to main content

ListTimeZones

サマリー

Lists valid time zone strings to be used with the timeZone or timeZoneIANA properties on the LayerTime class.

ディスカッション

The timeZone or timeZoneIANA properties on the LayerTime class only work with specific time zone strings. This function allows you to view a valid list of strings.

構文

ListTimeZones({wildcard}, {time_zone_type})

パラメーター 説明 データ タイプ

wildcard

A wildcard is based on the time zone string and is not case sensitive. A combination of asterisks (*) and characters can be used to help limit the resulting list.

The default value is None.

String

time_zone_type

A string constant that controls the list of available time zone types to filter from.

  • IANA—Time zones are displayed using Internet Assigned Numbers Authority (IANA) extended names including both standard and daylight offsets.

  • IANA_ABBREVIATED—Time zones are displayed using Internet Assigned Numbers Authority (IANA) location names including only the standard offsets.

  • MICROSOFT_WINDOWS—Time zones are displayed using the Microsoft Windows operating system names.

The default value is MICROSOFT_WINDOWS.

String

戻り値

データ タイプ 説明

List

A list of valid time zone strings to be used with the timeZone or timeZoneIANA properties on the LayerTime class.

コードのサンプル

ListTimeZones example

The following script will print all time zones that contain the text Canada.

import arcpy
tzList = arcpy.mp.ListTimeZones("*Canada*")
print(tzList)