I need to check in PHP if the current time is before 2pm that day.
I\'ve done this with strtotime on dates before, however this time it\'s with a time o
strtotime
You could just pass in the time
if (time() < strtotime('2 pm')) { //not yet 2 pm }
Or pass in the date explicitly as well
if (time() < strtotime('2 pm ' . date('d-m-Y'))) { //not yet 2 pm }