Home  >  Article  >  Backend Development  >  php timestamp conversion date is incorrect

php timestamp conversion date is incorrect

王林
王林Original
2019-09-30 11:54:394005browse

php timestamp conversion date is incorrect

The solution to the incorrect date conversion in PHP timestamp is:

You need to modify the PHP time zone.

Solution steps:

1. Open the php.ini file configuration and search inside to find the ;date.timezone =UTC option;

2. Change the date.timezone option parameter UTC to PRC;

3. Remove the comment symbol of the date.timezone option;

4. Save the file and restart the server.

Recommended tutorial: PHP video tutorial

The above is the detailed content of php timestamp conversion date is incorrect. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn