Use:
$createtime =date ("y/m/d h:i:s", Time () +16*60*60);
$createtime =date ("y-m-d h:i:s");//Time: H = 24-hour system
The following error message appears after submitting the form:
Strict Standards: Date () [Function.date]: 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 is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected ' UTC ' for ' 8.0/no DST ' instead in C:\AppServ\www\www\phpsql\check_add.php on line one
Workaround:
Scenario 1:check_add.php Head: <?php date_default_timezone_set ("PRC"); ?> Set the default time zone to Beijing time. Resolves the current page.
Scenario 2: Set the value of Date.timezone in php.ini to PRC, set the following as: DATE.TIMEZONE=PRC, and cancel the comment of this line of code, that is, to remove the preceding semicolon.
Resolve all page usage time issues.
PHP Date ("y-m-d h:i:s") warning message appears