Skip to content

Commit

Permalink
trivial: Make the CycloneDX timestamps explicitly UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed Dec 13, 2024
1 parent 96b0a5f commit c829da2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uswid/format_cyclonedx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import json
import uuid
from datetime import datetime
from datetime import datetime, timezone

from .container import uSwidContainer
from .format import uSwidFormatBase
Expand Down Expand Up @@ -260,7 +260,7 @@ def save(self, container: uSwidContainer) -> bytes:

# metadata
metadata: Dict[str, Any] = {}
metadata["timestamp"] = datetime.now().isoformat()
metadata["timestamp"] = datetime.now(timezone.utc).isoformat()
root["metadata"] = metadata

# find tag creator
Expand Down

0 comments on commit c829da2

Please sign in to comment.