mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 03:38:26 -04:00
Fix incorrect processing started time on jobs
We were doing the UTC to BST conversion twice, meaning the job was shown as being started 2 hours later than UTC, and 1 hour later than actual BST.
This commit is contained in:
@@ -67,7 +67,7 @@ class Job(JSONModel):
|
||||
def processing_started(self):
|
||||
if not self._dict.get('processing_started'):
|
||||
return None
|
||||
return utc_string_to_aware_gmt_datetime(self._dict['processing_started'])
|
||||
return self._dict['processing_started']
|
||||
|
||||
def _aggregate_statistics(self, *statuses):
|
||||
return sum(
|
||||
@@ -124,7 +124,9 @@ class Job(JSONModel):
|
||||
# notifications yet
|
||||
return True
|
||||
return (
|
||||
datetime.utcnow().astimezone(local_timezone) - self.processing_started
|
||||
datetime.utcnow().astimezone(local_timezone) - utc_string_to_aware_gmt_datetime(
|
||||
self.processing_started
|
||||
)
|
||||
).days < 1
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user