From 53b6b23ccc778f7978ee536cdb1505777cdaefb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 22 May 2020 00:31:53 +0200 Subject: [PATCH] use only days --- src/api/route/InputServiceServer.kt | 2 +- test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/route/InputServiceServer.kt b/src/api/route/InputServiceServer.kt index 0636821..f3215bf 100644 --- a/src/api/route/InputServiceServer.kt +++ b/src/api/route/InputServiceServer.kt @@ -65,7 +65,7 @@ class InputServiceServer { val queueName = channel.queueDeclare().queue channel.queueBind(queueName, rabbitExchangeName, "") - val gson = GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create() + val gson = GsonBuilder().setDateFormat("yyyy-MM-dd").setPrettyPrinting().create() get("/sample"){ call.respond(resultObjectService.getAllInputObjects()) diff --git a/test.py b/test.py index 0661299..dd6a4d4 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.date.today().strftime("%Y-%m-%d %H:%M:%S"), "device_id" : "123"}), "application/json") + "description" : (None, json.dumps({"date" : datetime.date.today().strftime("%Y-%m-%d"), "device_id" : "123"}), "application/json") } r = requests.post(URL,files=files)