Commit c6c86a44 authored by Daniele Venzano's avatar Daniele Venzano

Fix API returning wrong times due to extravagant Python time zone management

parent b0932ad8
......@@ -81,9 +81,9 @@ class Execution:
'user_id': self.user_id,
'name': self.name,
'description': self.description,
'time_submit': self.time_submit.timestamp(),
'time_start': None if self.time_start is None else self.time_start.timestamp(),
'time_end': None if self.time_end is None else self.time_end.timestamp(),
'time_submit': (self.time_submit - datetime.datetime(1970, 1, 1)) / datetime.timedelta(seconds=1),
'time_start': None if self.time_start is None else (self.time_start - datetime.datetime(1970, 1, 1)) / datetime.timedelta(seconds=1),
'time_end': None if self.time_end is None else (self.time_end - datetime.datetime(1970, 1, 1)) / datetime.timedelta(seconds=1),
'status': self._status,
'error_message': self.error_message,
'services': [s.id for s in self.services]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment