<分区>
好吧,我有一个 UNIX 格式的时间。我需要找出特定时间和当前时间之间的差异。如果相差 5 分钟。做点什么。
$sp_time = 1400325952;//Specific time
$currentTime = //current time in UNIX format
$difference = $currentTime - $sp_time;
if($difference >= 5)//if difference is less than or equal to 5minutes
{
//DO SOME STUFF
}
编辑:如何找到分钟的差异以及如何获取当前时间?