本文介绍了你如何让 PHP 返回时区缩写 AEST?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我似乎找不到让 Pear 的 Date 类(或 PHP 的 date 函数)返回 AEST 作为澳大利亚/墨尔本时区的时区缩写的方法.它总是返回 EST.我尝试了所有打印出 Date::format、format2、format3 中可用时区的方法.有人知道怎么修这个东西吗?我正在运行 PHP 5.1.6、Pear Date 1.5.0a1 和最新的 PECL timezonedb.

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.

推荐答案

您是否检查过澳大利亚/墨尔本时区数据库中的内容?它可能基于 Olson 数据库,当我上次查看(2009a 版)时,它仍然说 EST 是澳大利亚/墨尔本的缩写.因此,除非您已将时区数据库固定为说 AEST,否则很可能会继续说 EST.这已经在 TZ 邮件列表上讨论过几次了;没有固定的答案,所以缩写保持不变.

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.

这篇关于你如何让 PHP 返回时区缩写 AEST?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:51