Subtracting Variables which are commands

I have this idea.
I have a variable for the start of someones log in time,
(start=`who am i | cut -c30-34`)
and a variable for the log out time or present time,
(end=`date | cut -c12-16`)
but how do I go about subtracting them to get the total log in time.
I've tried adding a another variable total.
total=$end-$start, but that's just prints out everything in a numeric fashion.(2:30-2:10)
and if I use expr I get an error message saying "expr: non-numeric argument"

Now this seems simple but why won't this work.
Please Help.


This gets tricky because what if their login time is 2:59, and the logout time is 3:10. 3:10-2:59=? The shell doesn't know that you are trying to subtract times, it just sees numbers with a colon in the middle. A better way to do this might be to use the 'last' command, as one of the fields it provides is the total log in time.

Using last is the better solution, but there needs to be some logic coded in. The problem is the case where the user has been logged in for more than 24 hours, last gives you something like:

chuckb xdmremote sunws6:0 Tue Mar 27 07:36 - 13:45 (2+06:08)

In this case I have been logged in for more 2 days, 6 hours and 8 minutes.