Refactor pk;switch move, specify UTC everywhere

This commit is contained in:
Ske 2018-12-18 18:30:10 +01:00
parent 97b972e38a
commit e8d1c5bf90
5 changed files with 19 additions and 18 deletions

View file

@ -285,7 +285,7 @@ async def add_switch(conn, system_id: int):
return res["id"]
@db_wrap
async def move_last_switch(conn, system_id: int, switch_id: int, new_time: datetime):
async def move_switch(conn, system_id: int, switch_id: int, new_time: datetime):
logger.debug("Moving latest switch (system={}, id={}, new_time={})".format(system_id, switch_id, new_time))
await conn.execute("update switches set timestamp = $1 where system = $2 and id = $3", new_time, system_id, switch_id)