Home  >  Article  >  Backend Development  >  php时间不正确的解决方法_php技巧

php时间不正确的解决方法_php技巧

WBOY
WBOYOriginal
2016-05-17 09:37:29951browse

2。date_default_timezone_set("PRC");   
3。PHP   5.1以上   
  PHP.ini   
  date.timezone   =   PRC  
或则
设置时区,php5新增的。   
  再php.ini中找到   
  [Date]   
  ;   Defines   the   default   timezone   used   by   the   date   functions   
  date.timezone   =Asia/Shanghai     
  修改为如上就可以了,更多的timezone支持请到php网站可找到。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn