简体   繁体   中英

php unix time “before 2pm today”

with PHP, I want to check if a time is "before 2pm" today

would strtotime allow something like that, or would a combination of other time/date functions get me this outcome

how would it be done?

I was thinking something like

if(savedTime < strtotime("before 2pm today"))

but it seems the statement isnt that good, ultimately I need both variables to be in unix/epoch time and the comparison itself will be simple, but I don't know how to get the current day's 2pm

你快到了:

if($savedTime < strtotime("2pm"))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM