Technically, this is easy, but I'm not sure why I can't make it work. I'm trying to compare a timestamp value in the db to the current time and then return the elapsed time as either minutes, hours, days or years ago...
Anyways, this is tossing things around on me...example:
$now = 20040528120000 // 05/28/2004 Noon
$dbtime = 30040528110100 // 05/28/2004 11:01:00am
Now, if I find the difference between ($now - $dbtime) I get 9900. This should be 59 minutes, but when I divide (9900 / 60) I get 165 minutes. Not the result I would expect.
So, I'm missing something here I guess, but I'm not sure where my logic went off course.
???
ps: my timestamps, if it isn't obvious, take the form YmdHis...isn't that right?