Browse files

Merge pull request #8 from grumdrig/master

TTL bug in nedis
  • Loading branch information...
2 parents 7abe6d5 + 1fd9d3c commit 189f92db6d8cce41f7b6b48f3e609645047e0ced @tj committed Sep 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/commands/keys.js
View
2 lib/commands/keys.js
@@ -67,7 +67,7 @@ exports.ttl = function(client, key){
var obj = this.lookup(string(key));
if (obj && 'number' == typeof obj.expires) {
- client.int(obj.expires - Date.now());
+ client.int(Math.round((obj.expires - Date.now()) / 1000));
} else {
client.nil();
}

0 comments on commit 189f92d

Please sign in to comment.