Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 9806518

Browse files
committed
[client] Remove default dates / cleanup exports (#329)
1 parent 0fc44b6 commit 9806518

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,16 @@ def prepare_export(
14061406
del entity["dataSource"]
14071407
del entity["dataSourceId"]
14081408

1409+
# Dates
1410+
if "first_seen" in entity and entity["first_seen"].startswith("1970"):
1411+
del entity["first_seen"]
1412+
if "start_time" in entity and entity["start_time"].startswith("1970"):
1413+
del entity["start_time"]
1414+
if "last_seen" in entity and entity["last_seen"].startswith("5138"):
1415+
del entity["last_seen"]
1416+
if "stop_time" in entity and entity["stop_time"].startswith("5138"):
1417+
del entity["stop_time"]
1418+
14091419
entity_copy = entity.copy()
14101420
if no_custom_attributes:
14111421
if "external_references" in entity:

0 commit comments

Comments
 (0)