How to get time difference in minutes in PHP
问题 How to calculate minute difference between two date-times in PHP? 回答1: Subtract the past most one from the future most one and divide by 60. Times are done in Unix format so they're just a big number showing the number of seconds from January 1, 1970, 00:00:00 GMT 回答2: The answers above are for older versions of PHP. Use the DateTime class to do any date calculations now that PHP 5.3 is the norm. Eg. $start_date = new DateTime('2007-09-01 04:10:58'); $since_start = $start_date->diff(new