gpt4 book ai didi

cakephp - CakePHP 中的时区错误?

转载 作者:行者123 更新时间:2023-12-01 07:08:02 25 4
gpt4 key购买 nike

我在 CakePHP 中收到以下错误:

Warning (2): strtotime() [http://php.net/function.strtotime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead [ROOT/cakephp/cake/libs/cache.php, line 570]



我也收到通知:

Trying to get property of non-object in /htdocs/cakephp/cake/libs/cache/file.php on line 248 Fatal error: Call to a member function cd() on a non-object in /htdocs/cakephp/cake/libs/cache/file.php on line 248



我添加了行 date_default_timezone_set("America/Anchorage");到顶部 [cake base directory]/libs/cache.php试图解决问题。
但错误仍然存​​在。

任何提示?

最佳答案

您必须使用 date_default_timezone_set 取消注释该行在 app/config/core.php并且警告应该消失。

关于cakephp - CakePHP 中的时区错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8278336/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com