我需要使用PHP计算正好7天前的时间戳,因此,如果当前是3月25日晚上7:30,它将返回3月18日晚上7:30的时间戳。
我应该从当前时间戳中减去604800秒,还是有更好的方法?
strtotime("-1 week")
strtotime是你的朋友
echo strtotime("-1 week");