SPDX tools like pyspdxtools or the online validator complain about the
timezone suffix. While both are valid ISO-8601 strings, apparently 'Z'
is expected instead of '+00:00'.
Error while parsing Document: ["time data '2026-09-09T12:20:03+00:00' does
not match format '%Y-%m-%dT%H:%M:%SZ'"]
Link: https://tools.spdx.org/app/validate/
Link:
https://spdx.github.io/spdx-spec/v2.3/document-creation-information/#69-created-field
Link: https://stackoverflow.com/a/63731605/462636
Signed-off-by: Alexander Dahl <[email protected]>
---
scripts/report/spdx_sbom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/report/spdx_sbom.py b/scripts/report/spdx_sbom.py
index b9132f43c..f39b37487 100644
--- a/scripts/report/spdx_sbom.py
+++ b/scripts/report/spdx_sbom.py
@@ -145,7 +145,7 @@ class SpdxSbomGenerator(SbomGenerator):
def build(self, data):
creationInfo = spdx.SPDXCreationInfo()
creationInfo.created = (
- datetime.now(timezone.utc).replace(microsecond=0).isoformat()
+
datetime.now(timezone.utc).replace(microsecond=0).isoformat().replace('+00:00',
'Z')
)
creationInfo.creators = [
f"Organization: {data['bsp']['vendor']}",
--
2.47.3