mirror of
https://github.com/nikdoof/apishiv.git
synced 2025-12-11 14:42:18 +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)
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user