Skip to content

Commit

Permalink
Fix datetime.utcnow() deprecated in Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Dec 14, 2023
1 parent 728752d commit 904d269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytest_benchmark/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import subprocess
import sys
import types
from datetime import datetime
from datetime import datetime, UTC
from decimal import Decimal
from functools import partial
from os.path import basename
Expand Down Expand Up @@ -198,7 +198,7 @@ def get_commit_info(project_name=None):


def get_current_time():
return datetime.utcnow().strftime("%Y%m%d_%H%M%S")
return datetime.now(UTC).strftime("%Y%m%d_%H%M%S")


def first_or_value(obj, value):
Expand Down

0 comments on commit 904d269

Please sign in to comment.