diff options
author | andy <andy@whiskeymedia.com> | 2013-04-22 13:43:14 -0700 |
---|---|---|
committer | andy <andy@whiskeymedia.com> | 2013-04-22 13:43:14 -0700 |
commit | 80dda11c934b4de63f3027c84cea4e1add47d37e (patch) | |
tree | de3e67448b4e0963903fd0224431bfc0e15f583b /redis/client.py | |
parent | 1cb44f26d89455032fe2bd42d6a0a405296a4bf2 (diff) | |
download | redis-py-80dda11c934b4de63f3027c84cea4e1add47d37e.tar.gz |
math is hard
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 4 |
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): |