summaryrefslogtreecommitdiff
path: root/kombu/async/timer.py
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2014-06-11 14:55:11 +0100
committerAsk Solem <ask@celeryproject.org>2014-06-11 14:55:11 +0100
commit6524bd293ab580eaa1ac239de38e99856d07c282 (patch)
treedf953960f43fed46472469473df82620c4786269 /kombu/async/timer.py
parente6a3e7eaf233937efe967faa56aab8e6c5b059dd (diff)
parent244b882e0c103b915e98de6ebb7d0cb026974515 (diff)
downloadkombu-curlclient.tar.gz
Merge branch 'master' into curlclientcurlclient
Conflicts: kombu/async/hub.py kombu/tests/case.py kombu/tests/transport/test_redis.py kombu/transport/SQS.py
Diffstat (limited to 'kombu/async/timer.py')
-rw-r--r--kombu/async/timer.py3
1 files changed, 1 insertions, 2 deletions
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