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...