mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl via ptxdist <ptxdist@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>, Ralf Glaser <glaser@iotmaxx.de>,
	Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [ptxdist] [PATCH 1/3] report: spdx_sbom: Fixed "created" field format
Date: Mon, 14 Sep 2026 13:23:09 +0200	[thread overview]
Message-ID: <20260914112311.93693-2-ada@thorsis.com> (raw)
In-Reply-To: <20260914112311.93693-1-ada@thorsis.com>

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 <ada@thorsis.com>
---
 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




  reply	other threads:[~2026-09-14 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 11:23 [ptxdist] [PATCH 0/3] report: spdx_sbom: Assorted minor improvements Alexander Dahl via ptxdist
2026-09-14 11:23 ` Alexander Dahl via ptxdist [this message]
2026-09-14 11:23 ` [ptxdist] [PATCH 2/3] report: spdx_sbom: Fix externalPackageRef type in category SECURITY Alexander Dahl via ptxdist
2026-09-14 11:23 ` [ptxdist] [PATCH 3/3] report: spdx_sbom: Convert pkg_name into valid idstring Alexander Dahl via ptxdist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260914112311.93693-2-ada@thorsis.com \
    --to=ptxdist@pengutronix.de \
    --cc=ada@thorsis.com \
    --cc=glaser@iotmaxx.de \
    --cc=m.olbrich@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox