PHP时间戳

发布时间 2023-07-14 11:27:38作者: WebLinuxStudy

1、当前时间戳
time() 或者 strtotime('now')
2、当天0点0分0秒的时间戳
strtotime('today')
3、昨天0点0分0秒的时间戳
strtotime('yesterday')
4、一天前(即24小时前)的时间戳
strtotime('1 day ago') 或者 strtotime('-1 day') 或者 strtotime('-1 days')
5、一天后(即24小时后)的时间戳
strtotime('1 day') 或者 strtotime('1 days')