do not use microseconds

This commit is contained in:
Nils Schneider 2013-03-12 20:52:20 +01:00
parent 36c852b7bb
commit 0a1bd6ab8d

View file

@ -8,6 +8,9 @@ class D3MapBuilder:
def build(self): def build(self):
output = dict() output = dict()
now = datetime.datetime.utcnow()
now.microsecond = 0
nodes = self._db.get_nodes() nodes = self._db.get_nodes()
output['nodes'] = [{'name': x.name, 'id': x.id, output['nodes'] = [{'name': x.name, 'id': x.id,
@ -25,7 +28,7 @@ class D3MapBuilder:
} for x in links] } for x in links]
output['meta'] = { output['meta'] = {
'timestamp': datetime.datetime.utcnow().isoformat() 'timestamp': now.isoformat()
} }
return json.dumps(output) return json.dumps(output)