日期转时间戳:strtotime("2012-11-11")
时间戳转日期:date("Y-m-d",1353466300)
时间戳为秒,所以计算两个时间戳的差,除以3600,得出相差多少小时;
相差多少天就不说了
日期转时间戳:strtotime("2012-11-11")
时间戳转日期:date("Y-m-d",1353466300)
时间戳为秒,所以计算两个时间戳的差,除以3600,得出相差多少小时;
相差多少天就不说了
转载于:https://www.cnblogs.com/oo-oo/archive/2012/11/23/time_date.html