X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=loctrkd%2Fevstore.py;h=8cf320621d74845608650c91aed5e8579af15fdc;hb=a8fcc61066d792404e6343e065270484ae18c7a3;hp=7c92e3a1d5291105042484518c442cb67a06d39c;hpb=f83cb02ad5c21b956ad739e18fb112f9f1cf46f4;p=loctrkd.git diff --git a/loctrkd/evstore.py b/loctrkd/evstore.py index 7c92e3a..8cf3206 100644 --- a/loctrkd/evstore.py +++ b/loctrkd/evstore.py @@ -29,7 +29,7 @@ SCHEMA = ( """create table if not exists pmodmap ( imei text not null unique, pmod text not null, - tstamp real not null default (unixepoch()) + tstamp real not null default (strftime('%s')) )""", ) @@ -144,7 +144,7 @@ def fetchpmod(imei: str) -> Optional[Any]: cur = DB.cursor() cur.execute( """select pmod from pmodmap where imei = ? - and tstamp > unixepoch() - 3600.0""", + and tstamp > strftime('%s') - 3600.0""", (imei,), ) result = cur.fetchone()