I have items in my database that need to expire after a given time period. To keep things sensible and insure they that only expire once per day I want to round my UTC dates using php. Does anyone see any huge problems in using this code to do so:
echo date('D, d M Y H:i:s',strtotime(date('d M Y', time())));
Excused that code will give the current date but at 12:00am. Is there a simpler/better way to do what I’m trying to do here?
If you want to use a specific time then you can just enter the actual time: