From 3d67c5e8152536e894251cb37aad3114e719f1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 22 May 2020 00:10:10 +0200 Subject: [PATCH] one time format --- src/Application.kt | 2 +- test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application.kt b/src/Application.kt index aa53204..1664d2a 100644 --- a/src/Application.kt +++ b/src/Application.kt @@ -23,7 +23,7 @@ fun Application.module() { install(ContentNegotiation) { gson { setPrettyPrinting() - setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS") + setDateFormat("yyyy-MM-dd'T'HH:mm:ss") } } diff --git a/test.py b/test.py index ce19791..b787ceb 100644 --- a/test.py +++ b/test.py @@ -10,7 +10,7 @@ FILE = 'CommonStarling_102761_45.wav' files = { "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)