为什么 Asia/Dubai 时区缩写在 timezonedb 和 tzdata 之间不同?
Why does Asia/Dubai timezone abbreviation differ between timezonedb and tzdata?
我正在使用 php timezonedb 2017.2。
为什么 returns +04 而不是 Asia/Dubai 时区的商品及服务税?
默认内置 php tzdata returns GST.
$dt = new DateTime('now', new DateTimezone('Asia/Dubai'));
$dt->format('T'); // returns either GST or +04
php -v = PHP 5.5.38 (cli)(内置:2016 年 10 月 25 日 18:30:32)
基本上,因为时区数据随时间变化。听起来 timezonedb
是最新的,但 tzdata
不是。
此更改是在 IANA time zone data 的 2017a 版中进行的。
来自公告电子邮件 - 强调我的:
Changes to past and future time zone abbreviations
Switch to numeric time zone abbreviations for South America, as
part of the ongoing project of removing invented abbreviations.
This avoids the need to invent an abbreviation for the new Chilean
new zone. Similarly, switch from invented to numeric time zone
abbreviations for Afghanistan, American Samoa, the Azores,
Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei,
Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is,
Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland,
Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia,
the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia,
Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau,
Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St
Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore,
Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and
Xinjiang; for 20-minute daylight saving time in Ghana before 1943;
for half-hour daylight saving time in Belize before 1944 and in
the Dominican Republic before 1975; and for Canary Islands before
1946, for Guinea-Bissau before 1975, for Iceland before 1969, for
Indian Summer Time before 1942, for Indonesia before around 1964,
for Kenya before 1960, for Liberia before 1973, for Madeira before
1967, for Namibia before 1943, for the Netherlands in 1937-9, for
Pakistan before 1971, for Western Sahara before 1977, and for
Zaporozhye in 1880-1924.
我正在使用 php timezonedb 2017.2。
为什么 returns +04 而不是 Asia/Dubai 时区的商品及服务税?
默认内置 php tzdata returns GST.
$dt = new DateTime('now', new DateTimezone('Asia/Dubai'));
$dt->format('T'); // returns either GST or +04
php -v = PHP 5.5.38 (cli)(内置:2016 年 10 月 25 日 18:30:32)
基本上,因为时区数据随时间变化。听起来 timezonedb
是最新的,但 tzdata
不是。
此更改是在 IANA time zone data 的 2017a 版中进行的。
来自公告电子邮件 - 强调我的:
Changes to past and future time zone abbreviations
Switch to numeric time zone abbreviations for South America, as part of the ongoing project of removing invented abbreviations. This avoids the need to invent an abbreviation for the new Chilean new zone. Similarly, switch from invented to numeric time zone abbreviations for Afghanistan, American Samoa, the Azores, Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei, Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is, Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland, Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia, the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia, Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau, Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore, Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and Xinjiang; for 20-minute daylight saving time in Ghana before 1943; for half-hour daylight saving time in Belize before 1944 and in the Dominican Republic before 1975; and for Canary Islands before 1946, for Guinea-Bissau before 1975, for Iceland before 1969, for Indian Summer Time before 1942, for Indonesia before around 1964, for Kenya before 1960, for Liberia before 1973, for Madeira before 1967, for Namibia before 1943, for the Netherlands in 1937-9, for Pakistan before 1971, for Western Sahara before 1977, and for Zaporozhye in 1880-1924.