Fix a "invalid time format" in front.views.status_single on Windows hosts. Fixes #224

This commit is contained in:
Pēteris Caune 2019-02-27 16:23:57 +02:00
parent 290d46bc2a
commit 100bc3c5e7
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
3 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
### Bug Fixes
- Fix refreshing of the checks page filtered by tags (#221)
- Escape asterisks in Slack messages (#223)
- Fix a "invalid time format" in front.views.status_single on Windows hosts
## 1.5.0 - 2019-02-04

View File

@ -29,7 +29,7 @@ class StatusSingleTestCase(BaseTestCase):
doc = r.json()
self.assertEqual(doc["status"], "up")
self.assertEqual(doc["updated"], p.created.strftime("%s.%f"))
self.assertEqual(doc["updated"], str(p.created.timestamp()))
self.assertTrue("test-user-agent" in doc["events"])
def test_it_omits_events(self):

View File

@ -494,7 +494,7 @@ def status_single(request, code):
events = _get_events(check, 20)
updated = "1"
if len(events):
updated = events[0].created.strftime("%s.%f")
updated = str(events[0].created.timestamp())
doc = {
"status": status,