Browse Source

Merge pull request #125 from prgTW/patch-1

Return consistent date formats in API
pull/133/head
Pēteris Caune 7 years ago
committed by GitHub
parent
commit
b6f6ca2f2b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      hc/api/models.py

+ 2
- 2
hc/api/models.py View File

@ -167,8 +167,8 @@ class Check(models.Model):
result["tz"] = self.tz result["tz"] = self.tz
if self.last_ping: 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: else:
result["last_ping"] = None result["last_ping"] = None
result["next_ping"] = None result["next_ping"] = None


Loading…
Cancel
Save