Store timestamps as int in db

This commit is contained in:
Lucas Verney 2017-08-31 14:40:33 +02:00
parent 1772cf0321
commit a0b379bfcd

View File

@ -141,7 +141,7 @@ def update_stations():
"stationsevents(station_id, timestamp, event) " + "stationsevents(station_id, timestamp, event) " +
"VALUES(?, ?, ?)", "VALUES(?, ?, ?)",
(station["number"], (station["number"],
time.time(), int(time.time()),
json.dumps(event))) json.dumps(event)))
except KeyError: except KeyError:
c.execute("INSERT INTO " + c.execute("INSERT INTO " +