When you call the date function in your PHP code, you see the following error in the log
PHP warning:date (): It isn't safe to rely on the system's timezone settings.
You are are *required* to use the Date.timezone setting or the Date_default_timezone_set () function.
In case you are used any of those methods and your are still getting this warning,
You most likely misspelled the timezone identifier. We selected ' asia/chongqing ' for ' cst/8.0/no DST ' instead
Why is there such an error?
The time zone setting (Date.timezone) is referenced from PHP 5.1.0, but it is closed by default, so using functions such as date () produces e_notice or e_warning information.
Treatment Method 1
Add code before calling date
Add code to the header: Ate_default_timezone_set ("PRC");
Add code to the header: Ini_set (' Date.timezone ', ' Comment: RPC ');
Enable the Date.timezone setting in php.ini and set its value: DATE.TIMEZONE=PRC, and restart Apache;
Note: RPC represents the People's Republic of China.