diff --git a/home.db b/home.db index 480bc3f..874f39a 100644 Binary files a/home.db and b/home.db differ diff --git a/macLookup.py b/macLookup.py index 207ae94..1344f9b 100755 --- a/macLookup.py +++ b/macLookup.py @@ -39,7 +39,7 @@ def getTimes(): return returnList def convertTime(seconds): - delta = time() - seconds + delta = float("%0.2f" % (time() - seconds)) if delta >= 86400: return str(delta//86400) + ' days' elif delta >= 3600: @@ -65,7 +65,7 @@ def updateTimes(): online = list(set(getOnlineClients()) & set(getAddr(c))) for adr in online: - c.execute('UPDATE lastonline SET timesince='+ str("{:10.2f}".format(curTime)) +' WHERE clientadr="'+ adr + '"') + c.execute('UPDATE lastonline SET timesince='+ "%0.2f" % curTime +' WHERE clientadr="'+ adr + '"') conn.commit() conn.close() @@ -82,3 +82,4 @@ if __name__ == '__main__': +