From 4edd409cc83fb8c6e651a4991fe0b1f205cbc768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 22 May 2020 00:14:16 +0200 Subject: [PATCH] remove T from dateformat --- src/Application.kt | 2 +- test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Application.kt b/src/Application.kt index 1664d2a..1a4f126 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") + setDateFormat("yyyy-MM-dd HH:mm:ss") } } diff --git a/test.py b/test.py index b787ceb..0661299 100644 --- a/test.py +++ b/test.py @@ -2,7 +2,7 @@ import requests import os.path import json -from datetime import datetime +import datetime URL = "http://127.0.0.1:8080/sample" @@ -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" : 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 %H:%M:%S"), "device_id" : "123"}), "application/json") } r = requests.post(URL,files=files)