时区格式
可用于不同时区规格的格式:数字值、字符串或实体.
以小时数为形式获取你的系统时区相对于格林尼治标准时间的偏移量.
In[1]:=
![Click for copyable input](assets.zh/time-zone-formats/In_12.png)
$TimeZone
Out[1]=
![](assets.zh/time-zone-formats/O_12.png)
这就是你的系统时区 "TimeZone" 实体.
In[2]:=
![Click for copyable input](assets.zh/time-zone-formats/In_13.png)
$TimeZoneEntity
Out[2]=
![](assets.zh/time-zone-formats/O_13.png)
获取指定名称的时区的当前日期和时间.
In[3]:=
![Click for copyable input](assets.zh/time-zone-formats/In_14.png)
DateObject[TimeZone -> "Asia/Tokyo"]
Out[3]=
![](assets.zh/time-zone-formats/O_14.png)
获取一个时区 "TimeZone" 实体的范例列表.
In[4]:=
![Click for copyable input](assets.zh/time-zone-formats/In_15.png)
EntityValue["TimeZone", "SampleEntities"]
Out[4]=
![](assets.zh/time-zone-formats/O_15.png)
可视化美国国境内使用山区时间(Mountain Time)的地理区域.
In[5]:=
![Click for copyable input](assets.zh/time-zone-formats/In_16.png)
GeoGraphics[{Red, EdgeForm[Black],
Polygon[Entity["TimeZone", "America/Denver"]]},
GeoRange -> Quantity[650, "Miles"]]
Out[5]=
![](assets.zh/time-zone-formats/O_16.png)