Scrowler
07-10-2005, 02:51 AM
i have a bunch of logged time() values from around a week ago, and i want to calculate the difference between time() and that value like this:
$diff = time() - $pasttime;
the dilemma i am having with this is how to calculate how many days, hours, mins and seconds this difference is. help appreciated, this is reasonably urgent.
if you don't understand what i mean, i mean turning the difference which may be like 550392 (seconds) into something like 7 days, 3 hours, 28 mins, 51 secs.
$diff = time() - $pasttime;
the dilemma i am having with this is how to calculate how many days, hours, mins and seconds this difference is. help appreciated, this is reasonably urgent.
if you don't understand what i mean, i mean turning the difference which may be like 550392 (seconds) into something like 7 days, 3 hours, 28 mins, 51 secs.