UNIX timestamps are handy for finding elapsed time... a timestamp is the seconds elapsed since the epoch, Jan 1, 1970.
time() gives you the current timestamp, mktime() finds the timestamp for any date past, present or future.
To set the $due & $now (or $returned is probably better) in your situation:
let's say it was due March 5th, 2005 @ 3pm and returned March 5th @ 4pm.
I would insert the $due variable to the DB when the item is checked out...
$due=mktime(15,0,0,3,5,2005);
When the item is returned, use can just use time() OR, better, use the mktime() function again. This will allow you the option of manually adjusting the return time. in this case, it would look like:
$returned=mktime(16,0,0,3,5,2005);
You could also use strtotime(), but your input form probably has the date/time components separated anyway.