From 55197ee34198b2ccbe8ccc57bac336b9dd42e31b Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Mon, 19 May 2014 22:27:36 +0100 Subject: master now depends on Python 2.7 --- kombu/async/timer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kombu/async/timer.py') diff --git a/kombu/async/timer.py b/kombu/async/timer.py index 00f54123..09b6cf76 100644 --- a/kombu/async/timer.py +++ b/kombu/async/timer.py @@ -19,7 +19,6 @@ from weakref import proxy as weakrefproxy from kombu.five import monotonic from kombu.log import get_logger -from kombu.utils.compat import timedelta_seconds try: from pytz import utc @@ -41,7 +40,7 @@ def to_timestamp(d, default_timezone=utc): if isinstance(d, datetime): if d.tzinfo is None: d = d.replace(tzinfo=default_timezone) - return timedelta_seconds(d - EPOCH) + return max((d - EPOCH).total_seconds(), 0) return d -- cgit v1.2.1