I m使用PHP + mongoDB。
How can I get a time difference between two time values?
I have a real time value which is string
$realtime = "2010-01-01 12:00:00";
以及不准确的时间,
$mongotime = new Mongodate(strtotime($realtime));
因此,我可以使用固定时间价值或固定时间邮票。
但是,我不相信在两个价值观之间取得时间差异的途径。
Should I just subtract two $mongotime values and does it give me a time difference in seconds?