mirror of
https://github.com/nikdoof/apishiv.git
synced 2025-12-13 07:32:16 +00:00
Use unixepoch instead of utc, as the datetime is stored as unixtime
This commit is contained in:
@@ -55,7 +55,7 @@ class DbCacheHandler:
|
|||||||
docid = self._gen_docid(host, path, params)
|
docid = self._gen_docid(host, path, params)
|
||||||
self.log.debug("Retrieving document: %s" % docid)
|
self.log.debug("Retrieving document: %s" % docid)
|
||||||
try:
|
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()
|
res = self.cursor.fetchone()
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user