ListTimeZones
汇总
列出要与 LayerTime 类的 timeZone 或 timeZoneIANA 属性配合使用的有效时区字符串。
讨论
LayerTime 类的 timeZone 或 timeZoneIANA 属性仅适用于特定时区字符串。 此功能可用于查看有效的字符串列表。
语法
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.
(默认值为 MICROSOFT_WINDOWS) |
String |
返回值
| 数据类型 | 说明 |
|---|---|
|
List |
要与 LayerTime 类的 |
代码示例
以下脚本将打印包含文本 Canada 的所有时区。
import arcpy
tzList = arcpy.mp.ListTimeZones("*Canada*")
print(tzList)