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 2b233fb commit 8d0cfe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.11]
python-version: [3.9, 3.13]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
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, UTC

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(UTC).isoformat()
root["metadata"] = metadata

# find tag creator
Expand Down

0 comments on commit 8d0cfe5

Please sign in to comment.