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

后端 未结 5 1831
遇见更好的自我
遇见更好的自我 2021-02-19 20:03

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:20

    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.

提交回复
热议问题