Skip to main content

ListTimeZones

汇总

列出要与 LayerTime 类的 timeZonetimeZoneIANA 属性配合使用的有效时区字符串。

讨论

LayerTime 类的 timeZonetimeZoneIANA 属性仅适用于特定时区字符串。 此功能可用于查看有效的字符串列表。

语法

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.

(默认值为 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.

(默认值为 MICROSOFT_WINDOWS)

String

返回值

数据类型 说明

List

要与 LayerTime 类的 timeZonetimeZoneIANA 属性配合使用的有效时区字符串列表。

代码示例

ListTimeZones 示例

以下脚本将打印包含文本 Canada 的所有时区。

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