PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

基础求教,该怎么解决

原创
2016-06-13 13:27:49 574浏览

基础求教
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 are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\AppServ\www\time.php on line 10
 北京时间:2012-04-11 15;32;57  
表示已经将windows php.int 改到Asia/hong_kong了 怎么还是差8个时差

------解决方案--------------------

PHP code


date_default_timezone_set

(PHP 5 >= 5.1.0)

date_default_timezone_set ― 设定用于一个脚本中所有日期时间函数的默认时区


说明

bool date_default_timezone_set ( string $timezone_identifier )

date_default_timezone_set() 设定用于所有日期时间函数的默认时区。 


Note: 

自 PHP 5.1.0 起(此版本日期时间函数被重写了),如果时区不合法则每个对日期时间函数的调用都会产生一条 E_NOTICE 级别的错误信息,如果使用系统设定或 TZ 环境变量则还会产生 E_STRICT 级别的信息。 



参数


timezone_identifier
时区标识符,例如 UTC 或 Europe/Lisbon。合法标识符列表见所支持的时区列表。 



返回值

 如果 timezone_identifier 参数无效则返回 FALSE,否则返回 TRUE。 
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。