获取第一秒的时间戳
$firstSeconds = strtotime(date("Y-m-d 00:00:00"));
//或者
$firstSeconds = strtotime(date("Y-m-d"));
获取最后一秒的时间戳
$lastSeconds = strtotime(date("Y-m-d 23:59:59"));
本文介绍了如何使用PHP获取一天中的第一个秒和最后一个秒的时间戳,这对于进行日期相关的数据统计或操作非常有用。
获取第一秒的时间戳
$firstSeconds = strtotime(date("Y-m-d 00:00:00"));
//或者
$firstSeconds = strtotime(date("Y-m-d"));
获取最后一秒的时间戳
$lastSeconds = strtotime(date("Y-m-d 23:59:59"));
2041
780