echo timezone_name_from_abbr(“”,3600 * 7,0); // ok
echo timezone_name_from_abbr(“”,3600 * 8,0); //不好!什么都不返回
echo timezone_name_from_abbr(“”,3600 * 9,0); // OK
PHP函数中的奇怪行为:timezone_name_from_abbr
0
A
回答
3
这可能是一个已知的bug:http://bugs.php.net/bug.php?id=44780
3600 * 8 = 28800实际上是不为PHP 5.2.6 零点偏移的列表。
1
好像蜜蜂此功能的知道是不是BUG:如果您在PHP的错误追踪搜索,你会发现这个报告:#44780 some time zone offsets not recognized by timezone_name_from_abbr
该报告正好对应于您遇到的错误。
有一个补丁,但该错误本身并没有被标记为已解决......它仍然存在于PHP 5.3.1-dev
相关问题
- 1. PHP系统函数奇怪的行为
- 2. shell_exec()函数行为奇怪
- 3. 构造函数中的奇怪行为
- 4. writeLines函数中的奇怪行为
- 5. dplyr中do()函数的奇怪行为
- 6. 奇怪的窗函数的行为
- 7. 奇怪的构造函数的行为
- 8. 奇怪的javascript函数的行为
- 9. python的exec函数的奇怪行为
- 10. PHP SCANDIR奇怪的行为
- 11. 奇怪的PHP行为
- 12. PHP array_diff:奇怪的行为
- 13. curl php奇怪的行为
- 14. php的奇怪行为
- 15. 奇怪的PHP行为
- 16. PHP Array奇怪的行为
- 17. PHP的json_decode()行为奇怪
- 18. 奇怪的PHP行为
- 19. PHP空()奇怪的行为
- 20. php SimpleXMLElement奇怪的行为
- 21. php tidy奇怪的行为
- 22. PHP:奇怪的函数调用函数()()
- 23. PlaySound函数奇怪的行为
- 24. jQuery AJAX函数奇怪的行为
- 25. '读'系统函数的奇怪行为
- 26. python函数的奇怪行为
- 27. 旋转函数奇怪的行为
- 28. 扩展C++函数的奇怪行为
- 29. 基本函数的奇怪行为
- 30. 与析构函数的奇怪行为