The time and date of the php program call time do not match the time at that time. solution: the time and date of the php program call time do not match the time at that time. the system environment is win2003 + php5.2 + mysql5.0 today we found that echodate (y-m-dh: i: s, time () date and local time do not match, so find the appropriate solution: modify php. ini open p php program call time occurrence time and date does not match the time at that time DE solution
The time and date of the php program call time do not match the time at that time
The system environment is win2003 + php5.2 + mysql5.0
Today, we found that echo date ("y-m-d h: I: s", time () does not match the local time, so the proper solution is:
Modify php. ini open php. search for date in ini. remove the semicolon = Asia/Shanghai from timezone and restart the IIS service (if this problem is not found on the linux server, restart the apache service on the linux server ).
After modification, as shown below:
Date. timezone = "Asia/Shanghai)
For the values after date. timezone,
Available values in mainland China: Asia/Chongqing (Chongqing), Asia/Shanghai (Shanghai), Asia/Urumqi (Urumqi )? Available in Hong Kong and Taiwan: Asia/Macao (Macao), Asia/Hong_Kong (Hong Kong), Asia/Taipei (Taipei)
? Singapore: Asia/Singapore
? Other available values: Etc/GMT-8, Singapore, Hongkong, PRC (People's Republic of China)
You can also search for the time zone identifier to write data. if you are interested, try again.
If there are good ways to share and learn from everyone
You can write a test page to test it.
You can write a test page.
$ Today = date ("F j, Y, g: I ");
Echo $ today;
?>
You can also use phpinfo to view the php date.
Phpinfo ();
?>
Find date in it to view it.
?