ERROR MESSAGE: date() [function.date]: It is not safe to rely on the system's timezone settings
如果你在升级到最新php版本后,得到如上所示错误提示,那是因为最新版的php5.3 date() 函数的重写所至,解决这个问题,有两种方法:
- 方法 1) 编辑服务器的php.ini文件 简单的编辑php.ini文件设置 date.timezone值( date.timezone = "timezone_here"),timezone的设置参考值在php.net website,设置修改保存 后,需要重起服务器。
- 方法 2) 编辑修改php文件(涉及date()函数的php文档)
如果你没有权限修改php.ini文件,直接在php文档最下方加上(date_default_timezone_set( "timezone_here" );)。
ERROR MESSAGE: date() [function.date]: It is not safe to rely on the system's timezone settings
If you receive the above error message, this is due to latest PHP5 date() function rewrite. To solve this issue, you can edit the php.ini or phplive/system.php.
Solution 1) Editing the php.ini file (recommended):
To solve this issue, simply edit your php.ini file and set your date.timezone value:
date.timezone = "timezone_here"
You can view supported timezone values at the PHP.net Website
After you set the date.timezone value, you will need to restart your web server.
Solution 2) Editing the phplive/system.php file:
If you do not have access to the php.ini file, you can further edit the system.php file and add the following code at the bottom of the file:
date_default_timezone_set( "timezone_here" );

Leave a comment