summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorandy <andy@whiskeymedia.com>2013-04-22 13:43:14 -0700
committerandy <andy@whiskeymedia.com>2013-04-22 13:43:14 -0700
commit80dda11c934b4de63f3027c84cea4e1add47d37e (patch)
treede3e67448b4e0963903fd0224431bfc0e15f583b /redis/client.py
parent1cb44f26d89455032fe2bd42d6a0a405296a4bf2 (diff)
downloadredis-py-80dda11c934b4de63f3027c84cea4e1add47d37e.tar.gz
math is hard
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 7f37c14..9f2e8b1 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -651,7 +651,7 @@ class StrictRedis(object):
"""
if isinstance(time, datetime.timedelta):
ms = int(time.microseconds / 1000)
- time = time.seconds + time.days * 24 * 3600 * 1000 + ms
+ time = (time.seconds + time.days * 24 * 3600) * 1000 + ms
return self.execute_command('PEXPIRE', name, time)
def pexpireat(self, name, when):
@@ -673,7 +673,7 @@ class StrictRedis(object):
"""
if isinstance(time_ms, datetime.timedelta):
ms = int(time_ms.microseconds / 1000)
- time_ms = time_ms.seconds + time_ms.days * 24 * 3600 * 1000 + ms
+ time_ms = (time_ms.seconds + time_ms.days * 24 * 3600) * 1000 + ms
return self.execute_command('PSETEX', name, time_ms, value)
def pttl(self, name):