Rounding a MYSQL datetime to earliest 15 minute interval in milliseconds (PHP)
问题 I'm fetching a datetime from MYSQL which looks like: 2010-08-11 11:18:28 I need to convert it into the "floor" or the earliest 15 minute interval and output in milliseconds for another function. So, this case would be: 2010-08-11 11:15:00 in milliseconds Whoops! Sorry - need to clarify - I need code that will transform it into milliseconds WITHIN php! Doing a timing test revealed the following: $time_start = microtime(true); for($i=0;$i<10000;$i++) floor(strtotime('2010-08-11 23:59:59')/(60