Skip to content

Commit

Permalink
Fix deprecation in Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Aug 24, 2023
1 parent 4f44963 commit bdfcb60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion freezegun/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def _parse_time_to_freeze(time_to_freeze_str):
elif isinstance(time_to_freeze_str, datetime.date):
time_to_freeze = datetime.datetime.combine(time_to_freeze_str, datetime.time())
elif isinstance(time_to_freeze_str, datetime.timedelta):
time_to_freeze = datetime.datetime.utcnow() + time_to_freeze_str
time_to_freeze = datetime.datetime.now(datetime.UTC) + time_to_freeze_str
else:
time_to_freeze = parser.parse(time_to_freeze_str)

Expand Down

0 comments on commit bdfcb60

Please sign in to comment.