X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=loctrkd%2Fevstore.py;fp=loctrkd%2Fevstore.py;h=8cf320621d74845608650c91aed5e8579af15fdc;hp=7c92e3a1d5291105042484518c442cb67a06d39c;hb=a8fcc61066d792404e6343e065270484ae18c7a3;hpb=e309a84d548213caf4382eda215dabf969332de4 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()