Home >Backend Development >PHP Tutorial >How to get yesterday's timestamp at 0 o'clock in php

How to get yesterday's timestamp at 0 o'clock in php

藏色散人
藏色散人forward
2019-12-07 17:23:224747browse

How to get the timestamp of yesterday's 0 o'clock in php?

Get the timestamp of 0 o'clock yesterday

strtotime('yesterday')

Get the timestamp of 24:00 last night

strtotime(date('Y-m-d'))

Get the timestamp of 23:59:59 last night

strtotime(date('Y-m-d')) - 1

For more PHP related knowledge, please visit PHP Tutorial!

The above is the detailed content of How to get yesterday's timestamp at 0 o'clock in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete