Php 如何提前1小时到达
如何在php中提前1小时获取Php 如何提前1小时到达,php,Php,如何在php中提前1小时获取 我尝试: 但不起作用 $jam = "10:00:00"; $1hrsbefore = strtotime($jam), strtotime(-1 hours); 请尝试以下代码: $jam = "10:00:00"; $timeadd= strtotime($jam) - 60*60; $time = date('H:i:s', $timeadd); echo $time; 试试这个 $jam="10:00:00"; $time = date('H:i:s',
我尝试:
但不起作用
$jam = "10:00:00";
$1hrsbefore = strtotime($jam), strtotime(-1 hours);
请尝试以下代码:
$jam = "10:00:00";
$timeadd= strtotime($jam) - 60*60;
$time = date('H:i:s', $timeadd);
echo $time;
试试这个
$jam="10:00:00";
$time = date('H:i:s', strtotime($jam) - 60*60);
echo $time;
这回答了你的问题吗?另一个类似的例子,但“加1小时”:@Ajith他并没有要求从当前时间减去-1小时。试试这个
$oneHourBefore=date(“H:i:s”,strotime(“10:00:00”)-(60*60))代码>