: This article mainly introduces how php solves the problem of server time in the United States. if you are interested in PHP tutorials, please refer to it. The speed of foreign servers is good, and there is no need to file records or anything. However, if a problem is found in the past two days, the call output time is not correct, and it is all in the United States, this is a problem. for example, today is July 22, April 2, but the page shows July 22, April 1. this is not very good. I checked the information and found that the code is quite useful. let's share it:
$ Date = putenv ('tz = America/Chicago ');
Mktime );
Echo date ("Y-m-d H: I: s ");
Change "TZ = America/Chicago" to your local time zone, for example, "TZ = Asia/Shanghai"
The above section describes how php solves the problem of server time in the United States, including related content, and hopes to help friends who are interested in PHP tutorials.