use nice timestamps (like ISO 8601) #1
1 changed files with 3 additions and 1 deletions
4
bot.py
4
bot.py
|
@ -1,6 +1,7 @@
|
|||
import simplematrixbotlib as botLibrary
|
||||
import json
|
||||
import fetch
|
||||
import time
|
||||
|
||||
version = "0.3.0"
|
||||
|
||||
|
@ -76,8 +77,9 @@ async def make_choice(room, message):
|
|||
|
||||
def formatData(data):
|
||||
if data is not None:
|
||||
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(data['created']))
|
||||
dataToFormat = data
|
||||
created = str(data['created'])
|
||||
created = timestamp
|
||||
description = str(data['desc'])
|
||||
imageid = str(data['iid'])
|
||||
ocr = str(data['ocr'])
|
||||
|
|
Loading…
Add table
Reference in a new issue