时间戳比较

$a = '2014-12-30 00:00:00';
$b = '2014-12-30 00:10:00';
echo strtotime($a)."\n";    //1419894000
echo strtotime($b);         //1419894600
相差10分钟(600秒),时间戳就是600

posted on 2014-12-30 10:45  walter371  阅读(272)  评论(0编辑  收藏  举报

导航