fix: [stix2 export] Fixed timestamp to datetime conversion for 'date_sighting', using utc format

pull/3610/head
chrisr3d 2018-09-04 14:54:31 +02:00
parent 0013620d32
commit f5f2fab292
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@ class StixBuilder():
if hasattr(attribute, 'Sighting'):
for sighting in attribute.Sighting:
if sighting['Organisation']['name'] == self.misp_event.Orgc.name and sighting['type'] == "2":
indicator_args['valid_until'] = datetime.datetime.fromtimestamp(int(sighting['date_sighting'])).isoformat()
indicator_args['valid_until'] = datetime.datetime.fromtimestamp(int(sighting['date_sighting']), datetime.timezone.utc).isoformat()
break
if hasattr(attribute, 'comment') and attribute.comment:
indicator_args['description'] = attribute.comment