Home  >  Article  >  Backend Development  >  php调整服务器时间的方法_PHP教程

php调整服务器时间的方法_PHP教程

WBOY
WBOYOriginal
2016-07-13 09:58:15758browse

php调整服务器时间的方法

 具体如下:

这里主要使用strftime函数实现这一功能,代码很简单,如下所示:

1

2

$today = date('Y-m-d-G');

$today = strftime("%Y-%m-%d-%H",strtotime("$today -5 hour"));

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/978264.htmlTechArticlephp调整服务器时间的方法 具体如下: 这里主要使用strftime函数实现这一功能,代码很简单,如下所示: 1 2 $today = date('Y-m-d-G'); $today = strf...
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