计算指定时间的时间戳 public function test() { #当前时间前天8点的时间戳 $mtime_8= strtotime(date("Y-m-d", strtotime("-2 day"))) + 8*60*60; #当前时间前天20点的时间戳 $mtime_20 = strtotime(date("Y-m-d", strtotime("-2 day"))) + 20*60*60; echo $mtime_8.PHP_EOL; echo $mtime_20; }