Stop Warning: date() [function.date]: from localhost

后端 未结 5 1402
半阙折子戏
半阙折子戏 2021-02-19 20:09

Warning: date() [function.date]: It is not safe to rely on the system\'s timezone settings. You are required to use the date.timezone setting or the date

5条回答
  •  执念已碎
    2021-02-19 20:37

    As the other posters have mentioned, setting date.timezone in the php.ini file is the way to go. If you are still seeing the error about needing to set it, did you restart your web server (apache, IIS, etc) after setting the php.ini?

    Also, the warning from phpinfo means the rest of the output should still be showing. Make sure you're editing the correct php.ini file according to the phpinfo() output.

    That will likely get you working as you'd like.

提交回复
热议问题