Skip to content

Replace deprecated datetime.datetime.utcnow()#1295

Merged
sigmavirus24 merged 1 commit into
PyCQA:mainfrom
purplezimmermann:zimmermann/fix-utcnow
Sep 5, 2025
Merged

Replace deprecated datetime.datetime.utcnow()#1295
sigmavirus24 merged 1 commit into
PyCQA:mainfrom
purplezimmermann:zimmermann/fix-utcnow

Conversation

@purplezimmermann
Copy link
Copy Markdown
Contributor

Deprecated since Python 3.12: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow

Using datetime.datetime.now(datetime.timezone.utc) instead – which is compatible with Python 3.9+

Closes #1294

Comment thread bandit/formatters/sarif.py
Deprecated since Python 3.12

Using datetime.datetime.now(datetime.timezone.utc) instead,
which is compatible with Python 3.9+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated datetime.datetime.utcnow()

3 participants