When generating a Bill Of Materials, the SPDX specification for the
Created field expect the date with format YYYY-MM-DDThh:mm:ssZ.
The current implementation does the transformation to express the
current time in UTC, but this has the side effect to add +00:00 at the
end of the date when formatting it. The resulting date
YYYY-MM-DDThh:mm:ss+00:00Z does not match the SPDX specification and
validation using the SPDX online tools fail because of this invalid
format.
Make sure to remove tzinfo from the date so that time zone information
is not output when formatting the date, so that we can safely append a
Z at the end to indicate UTC time-zone.
Other formats for the time-zone (e.g. +00:00) is not allowed by the
SPDX specification.
When generating a Bill Of Materials, the SPDX specification for the Created field expect the date with format
YYYY-MM-DDThh:mm:ssZ
.The current implementation does the transformation to express the current time in UTC, but this has the side effect to add
+00:00
at the end of the date when formatting it. The resulting dateYYYY-MM-DDThh:mm:ss+00:00Z
does not match the SPDX specification and validation using the SPDX online tools fail because of this invalid format.Make sure to remove
tzinfo
from the date so that time zone information is not output when formatting the date, so that we can safely append aZ
at the end to indicate UTC time-zone.Other formats for the time-zone (e.g.
+00:00
) is not allowed by the SPDX specification.Fixes: #918