diff --git a/lib/SimpleSAML/Store/Redis.php b/lib/SimpleSAML/Store/Redis.php index 2f568e3600544953edfd2c43384ffe1be654850e..d102b01fd5d955fa2f7a880ba32cc7c320412b7e 100644 --- a/lib/SimpleSAML/Store/Redis.php +++ b/lib/SimpleSAML/Store/Redis.php @@ -98,7 +98,8 @@ class Redis extends Store if ($expire === null) { $this->redis->set("{$type}.{$key}", $serialized); } else { - $this->redis->setex("{$type}.{$key}", $expire, $serialized); + // setex expire time is in seconds (not unix timestamp) + $this->redis->setex("{$type}.{$key}", $expire - time(), $serialized); } }