: This article describes how to solve the problem of mktime () [function. mktime]: itisnotsafetorelyonthesystemstimezoneset.pdf. if you are interested in PHP tutorials, refer to it. Problems encountered during php code deployment:
Strict Standards: date_default_timezone_get () [function. date-default-timezone-get]: It is not safe to rely on the system's timezone settings. please use the date. timezone setting, the TZ environment variable or the date_default_timezone_set () function. in case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. we selected 'utc' for '8. 0/no DST 'Instead in C: \ AppServ \ www \ nipin \ configs \ config. php on line 25
Strict Standards: mktime () [function. mktime]: It is not safe to rely on the system's timezone settings. please use the date. timezone setting, the TZ environment variable or the date_default_timezone_set () function. in case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. we selected 'utc' for '8. 0/no DST 'Instead in C: \ AppServ \ www \ nipin \ configs \ config. php on line 25
Strict Standards: mktime () [function. mktime]: You shocould be using the time () function instead in C: \ AppServ \ www \ nipin \ configs \ config. php on line 25
The reason is that the difference between the GMT time obtained by php and the Beijing time is 8 hours. The Beijing time should be used.
The above error was reported mainly in one sentence:
$ Getime = date_default_timezone_get () = 'utc '? Mktime () + 28800: mktime ();
There are two solutions:
1. directly add this sentence to replace the above sentence, date_default_timezone_set ("PRC"); directly set it to the background time.
2. in the php. ini file, set:; date. timezone = Asia/Shanghai or date. timezone = PRC.
The mktime () [function. mktime]: It is not safe to rely on the systems timezone settings to solve the problem, including some content, hope to be helpful to friends interested in PHP tutorials.