RobCombs/django-locking — pull request #1 by jwhitlock (2012-04-13 14:58:46+00:00)
Title: Fix lock expiration and seconds remaining when lock passes 24 hours old

datetime.timedelta() normalizes times to days and seconds within a day. For example, if a time delta is 86401 seconds, then td.seconds is 1. The way to get absolute seconds is to mutliply td.days by seconds in a day, and then add in seconds. In python 2.7, there is a [timedelta.total_seconds()](http://docs.python.org/release/2.7/library/datetime.html#datetime.timedelta.total_seconds) call that does this math for you.

Because is_locked and lock_seconds_remaining only looked at the seconds, they behave strangely around day barriers.

I've tested this change against the 0.3 codebase, which we're using, but not 1.0. The tests should work, (and some fail without the change), but someone should try it.