timezones
列出时区
说明
timezones
显示 datetime
函数接受的所有互联网号码分配局 (IANA) 时区的列表。对于每个时区,该列表包含与 UTC 的偏移量(以小时为单位,其中东向为正时)和夏令时调整(以小时为单位)。
timezones(
显示包含指定地理区域中所有 IANA 时区的列表。area
)
[
还返回 T
,vers
] = timezones(___)datetime
数据类型当前使用的 IANA 时区数据库版本。此版本包括来自 IANA 的最新更新。有关详细信息,请参阅 IANA 时区数据库。
示例
列出澳大利亚的所有时区
在一个表中存储 datetime
函数接受的所有澳大利亚时区。
T = timezones('Australia')
T=12×4 table
Name Area UTCOffset DSTOffset
_________________________ _________ _________ _________
{'Australia/Adelaide' } Australia 9.5 1
{'Australia/Brisbane' } Australia 10 0
{'Australia/Broken_Hill'} Australia 9.5 1
{'Australia/Currie' } Australia 10 1
{'Australia/Darwin' } Australia 9.5 0
{'Australia/Eucla' } Australia 8.75 0
{'Australia/Hobart' } Australia 10 1
{'Australia/Lindeman' } Australia 10 0
{'Australia/Lord_Howe' } Australia 10.5 0.5
{'Australia/Melbourne' } Australia 10 1
{'Australia/Perth' } Australia 8 0
{'Australia/Sydney' } Australia 10 1
按 UTC 偏移量对表进行排序。
sortrows(T,'UTCOffset')
ans=12×4 table
Name Area UTCOffset DSTOffset
_________________________ _________ _________ _________
{'Australia/Perth' } Australia 8 0
{'Australia/Eucla' } Australia 8.75 0
{'Australia/Adelaide' } Australia 9.5 1
{'Australia/Broken_Hill'} Australia 9.5 1
{'Australia/Darwin' } Australia 9.5 0
{'Australia/Brisbane' } Australia 10 0
{'Australia/Currie' } Australia 10 1
{'Australia/Hobart' } Australia 10 1
{'Australia/Lindeman' } Australia 10 0
{'Australia/Melbourne' } Australia 10 1
{'Australia/Sydney' } Australia 10 1
{'Australia/Lord_Howe' } Australia 10.5 0.5
输入参数
area
— 地理区域
'All'
| 'Africa'
| 'America'
| 'Antarctica'
| ...
地理区域,指定为下表中的区域之一。
'Africa' | 'Asia' | 'Europe' |
'America' | 'Atlantic' | 'Indian' |
'Antarctica' | 'Australia' | 'Pacific' |
'Arctic' | 'Etc' | 'All' |
输出参量
T
— 时区列表
表
时区列表,以表形式返回。
vers
— IANA 时区数据库版本
字符向量
IANA 时区数据库版本,以字符向量形式返回。
有关详细信息,请参阅 IANA 时区数据库。
版本历史记录
在 R2015b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)