How to adjust server time in PHP
The details are as follows:
The strftime function is mainly used to implement this function. The code is very simple, as shown below:
1
2
|
$today = date('Y-m-d-G');
$today = strftime("%Y-%m-%d-%H",strtotime("$today -5 hour"));
|
1
2
|
$today = date('Y-m-d-G');
$today = strftime("%Y-%m-%d-%H",strtotime("$today -5 hour"));
|
http://www.bkjia.com/PHPjc/978264.html
www.bkjia.com
trueTechArticleThe method of adjusting the server time in PHP is as follows: The strftime function is mainly used to implement this function. The code is very simple, as follows Shown: 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