What you get is the number of seconds between the two times. Displaying it nicely is left as an exercise to the reader (it's pretty easy, eg. (int)($totaltime / 3600) is the number of hours, then % 3600 is what's left over to be divided by 60, etc.).
So what's the problem? There are a couple good ways you could store any of that information in the DB. Either store it in an integer field as a timestamp, or as one of the DATETIME datatypes in your database. At least in Postgres, you can subtract them directly in the DB to get a difference. Or you can just get the timestamp value of the datetime field from the DB, and do the math in PHP. I don't see what the problem is..