Use unixepoch instead of utc, as the datetime is stored as unixtime

This commit is contained in:
2011-09-06 14:43:14 +01:00
parent 02c067420a
commit e01fd630ba

View File

@@ -55,7 +55,7 @@ class DbCacheHandler:
docid = self._gen_docid(host, path, params)
self.log.debug("Retrieving document: %s" % docid)
try:
self.cursor.execute("SELECT xml FROM api_cache WHERE docid = ? and datetime(cacheduntil, 'utc') >= current_timestamp", (docid,))
self.cursor.execute("SELECT xml FROM api_cache WHERE docid = ? and datetime(cacheduntil, 'unixepoch') >= current_timestamp", (docid,))
res = self.cursor.fetchone()
self.disconnect()
except sqlite3.Error as e: