How do you get PHP to return the timezone abbreviation AEST?

偶尔善良 提交于 2019-12-24 18:48:22

问题


I can't seem to find a way to get Pear's Date class (or PHP's date function) to return AEST as the timezone abbreviation for the timezone Australia/Melbourne. It always returns EST. I tried all the ways of printing out the timezone available in Date::format, format2, format3. Anyone know how to fix this? I'm running PHP 5.1.6, Pear Date 1.5.0a1, and the latest PECL timezonedb.


回答1:


Have you checked what it says in the time zone database for Australia/Melbourne? It is probably based on the Olson database, and when I last looked (2009a edition), it was still saying EST is the abbreviation for Australia/Melbourne. So, unless you have fixed the time zone database to say AEST, it is likely to continue to say EST. This has been debated on the TZ mailing list a few times; there isn't a settled answer, so the abbreviation remains unchanged.



来源:https://stackoverflow.com/questions/633300/how-do-you-get-php-to-return-the-timezone-abbreviation-aest

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!