More changes to formatting of decimals

This commit is contained in:
2017-02-10 16:55:13 +01:00
parent a5c16b88c9
commit 751e408b12
2 changed files with 3 additions and 2 deletions

BIN
home.db

Binary file not shown.

View File

@@ -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__':