This will display somthing like 2007-08-20 09:27:05
Edit:
Or are you asking how to add time together, as in 2:00 + 5:00 = 7:00, except in the format you posted? (I think this is what you're asking)
I'm not sure how to do this, but at a guess maybe you could explode the time at the colon, then adding them together normally using PHP (just like using 2 + 3) Then display it using somthing like:
$hours : $minutes : $seconds
But my knowledge of PHP is very limited and I assume there is a much easier way of doing this.
As far as I can see that would work but I think I may have made a simple problem 10x harder than it needed to be, I tend to overcomplicate things sometimes, but I don't know what the correct way to do it would be :P
can I suggest you take a read of the time() function in the php manual.
This function returns a timestamp based on the Unix epoch - simply the number of seconds since January 1 1970 00:00:00. You can increment and decrement this by adding and subtracting the number of seconds to achieve you desired date and time.
so if now is 10:56:45, you would add and then format the output using the date()
Comment