首页 >后端开发 >php教程 >PHP setTime 设置当前时间的代码_php实例

PHP setTime 设置当前时间的代码_php实例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-05-17 09:09:41941浏览
复制代码 代码如下:

function _niceTime($minute){
$m = $minute - 5;
$date = new DateTime();
$date->setTime(9, 00);//设置每天早上9点
return date("Y-m-d H:i",strtotime("+$m minute",$date->getTimestamp()));
}
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn