PHP setTime 设置当前时间
程序员文章站
2022-05-26 15:52:15
...
php代码
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())); }