Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Timestamp Representation in XML and JSON BOM Files #298

Open
eugenhoffmann opened this issue May 22, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@eugenhoffmann
Copy link

eugenhoffmann commented May 22, 2024

I have reported an Issue in the cyclonedx-dotnet repository regarding an inconsistent timestamp representation in the generated BOM files. The team has suggested that the issue may be related to the serialization process in the library. Here is the description of the issue:

I have noticed that the timestamp representation in the XML and JSON BOM files is inconsistent. While both formats are ISO 8601 conform, the XML BOM file contains a timestamp with a precision of up to 7 decimal places for the seconds fraction:

XML: 2024-05-17T15:50:31.6823708+00:00
JSON: 2024-05-17T15:50:31Z

In my opinion, this level of precision is not necessary. Furthermore, the second fractions more than 3 digits are not supported by the Python API datetime.fromisoformat(date_string) method.

While these differences are not incorrect, they can be confusing and may cause issues when processing the data. I would like to propose that we adopt a consistent timestamp representation across both file formats, ideally using the JSON timestamp format.

Thank you for considering this issue!

@fmh093
Copy link

fmh093 commented May 24, 2024

I have the same issue. In my case it prevents me from uploading my BOM file to Dependency Track. If I fix the timestamp to a proper format, then there's no issue uploading it.

@mtsfoni
Copy link
Contributor

mtsfoni commented May 24, 2024

@fmh093 How do you try to upload them? Just via the web interface?

@mtsfoni mtsfoni added the bug Something isn't working label May 24, 2024
@fmh093
Copy link

fmh093 commented May 27, 2024

@fmh093 How do you try to upload them? Just via the web interface?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants