summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/json/couchSession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/project2/json/couchSession.cpp b/project2/json/couchSession.cpp
index fbe38f8..fd0d1b0 100644
--- a/project2/json/couchSession.cpp
+++ b/project2/json/couchSession.cpp
@@ -145,7 +145,7 @@ class CustomCouchSessionLoader : public SessionContainerLoaderImpl<CouchSessionC
// Create the server side search map
json::Object map;
Buffer mapBuf;
- mapBuf.appendf("function(doc) { var exp = doc['%s']; if (exp < (new Date().getTime() / 1000)) { emit(exp, doc._rev); } }",
+ mapBuf.appendf("function(doc) { var exp = doc['%s']; var now = (new Date().getTime() / 1000); if (exp < now) { emit(exp, doc._rev); } }",
CouchSessionContainer::ExpiryKey.c_str());
map["map"] = json::ValuePtr(new json::Value(mapBuf.str()));
Glib::ustring mapStr(json::serializeObject(map));