Permalink
Browse files

Make TTL return seconds rather than milliseconds, per spec

  • Loading branch information...
1 parent 7abe6d5 commit 1fd9d3c358501ac68bd641ec6d91443ec204f100 @grumdrig grumdrig committed Sep 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/commands/keys.js
View
@@ -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 1fd9d3c

Please sign in to comment.