php - Rounding a timestamp to midnight of the next day -


given timestamp, elegant solution round date up nearest midnight of next day?

for example 1374246685 (19/07/13 10:11:25) rounded 1374296400 (20/07/13 00:00:00).

even more elegant pete's solution:

$tomorrowmidnight = strtotime('tomorrow'); 

check out http://www.php.net/manual/en/datetime.formats.relative.php - can lots of fancy stuff :)


Comments