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

@ -18,6 +18,9 @@ class Switch(namedtuple("Switch", ["id", "system", "timestamp", "members"])):
async def delete(self, conn):
await db.delete_switch(conn, self.id)
async def move(self, conn, new_timestamp):
await db.move_switch(conn, self.system, self.id, new_timestamp)
async def to_json(self, conn):
return {
"timestamp": self.timestamp.isoformat(),