From 27f917ce02dae9e77e0853dd12590a69b46d220a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C3=B3jcik?= Date: Wed, 28 Jun 2017 13:02:11 +0200 Subject: [PATCH] Return consistent date formats in API --- hc/api/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hc/api/models.py b/hc/api/models.py index 68555e9a..8eddb2ae 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -167,8 +167,8 @@ class Check(models.Model): result["tz"] = self.tz if self.last_ping: - result["last_ping"] = self.last_ping.isoformat() - result["next_ping"] = (self.last_ping + self.timeout).isoformat() + result["last_ping"] = self.last_ping.replace(microsecond=0).isoformat() + result["next_ping"] = (self.last_ping + self.timeout).replace(microsecond=0).isoformat() else: result["last_ping"] = None result["next_ping"] = None