one time format
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-05-22 00:10:10 +02:00
parent e18d428587
commit 3d67c5e815
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ fun Application.module() {
install(ContentNegotiation) { install(ContentNegotiation) {
gson { gson {
setPrettyPrinting() setPrettyPrinting()
setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS") setDateFormat("yyyy-MM-dd'T'HH:mm:ss")
} }
} }

View File

@ -10,7 +10,7 @@ FILE = 'CommonStarling_102761_45.wav'
files = { files = {
"file": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}), "file": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}),
"description" : (None, json.dumps({"date" : datetime.now().isoformat(), "device_id" : "123"}), "application/json") "description" : (None, json.dumps({"date" : today.strftime("%Y-%m-%d %H:%M:%S"), "device_id" : "123"}), "application/json")
} }
r = requests.post(URL,files=files) r = requests.post(URL,files=files)