From: antirez Date: Mon, 2 Apr 2012 09:14:47 +0000 (+0200) Subject: RESTORE ability to set a TTL fixed, bug introduced with millisecond expires. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/70d848e1faff36e778f8e32c5a86628574c22b00?ds=sidebyside RESTORE ability to set a TTL fixed, bug introduced with millisecond expires. --- diff --git a/src/cluster.c b/src/cluster.c index a0dd6519..308d3bf7 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1577,7 +1577,7 @@ void restoreCommand(redisClient *c) { /* Create the key and set the TTL if any */ dbAdd(c->db,c->argv[1],obj); - if (ttl) setExpire(c->db,c->argv[1],time(NULL)+ttl); + if (ttl) setExpire(c->db,c->argv[1],mstime()+ttl); signalModifiedKey(c->db,c->argv[1]); addReply(c,shared.ok); server.dirty++;