Skip to content

Commit 153377e

Browse files
committed
Switching to supported now() function with UTC timezone
1 parent 57cb233 commit 153377e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enrich_code_scanning_alerts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import re
1616
from typing import Any
1717
from pathlib import Path
18-
from datetime import datetime
18+
from datetime import datetime, timezone
1919
import time
2020
from mistletoe import markdown
2121
import humanize
@@ -312,7 +312,7 @@ def make_summary(
312312
"""Make an HTML summary of the alerts."""
313313
title = '<div><h1><i class="fa-brands fa-github" style="font-size: xxx-large" title="GitHub Advanced Security"></i> Code Scanning Report</h1></div>'
314314
generated_at = '<div style="font-size: small">Generated at {}Z</div>'.format(
315-
datetime.utcnow().isoformat(timespec="seconds")
315+
datetime.now(timezone.utc).isoformat(timespec="seconds")
316316
)
317317
scope = "<div><strong>Scope</strong>: {}</div>".format(escape(scope))
318318

0 commit comments

Comments
 (0)