From a4defc272c77e4c9ab118fc5ed02be46110c1185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Tue, 19 Nov 2024 12:04:23 +0100 Subject: [PATCH] chg: [website] API - Bundles. Use .isoformat instead of using strftime. --- website/web/api/v1/bundle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/web/api/v1/bundle.py b/website/web/api/v1/bundle.py index f8f04d9..af7286c 100644 --- a/website/web/api/v1/bundle.py +++ b/website/web/api/v1/bundle.py @@ -215,8 +215,8 @@ def post(self) -> Tuple[ResultType, int]: bundle = bundle_ns.payload bundle["uuid"] = bundle.get("uuid", str(uuid.uuid4())) bundle["vulnerability_lookup_origin"] = local_instance_uuid - bundle["creation_timestamp"] = current_time.strftime("%Y-%m-%dT%H:%M:%S.%fZ") - bundle["timestamp"] = current_time.strftime("%Y-%m-%dT%H:%M:%S.%fZ") + bundle["creation_timestamp"] = current_time.isoformat() + bundle["timestamp"] = current_time.isoformat() # Find security advisories IDs in the description and add the result to the related vulnerabilities bundle.setdefault("related_vulnerabilities", []) bundle.get("related_vulnerabilities", []).extend(