Skip to content

Commit

Permalink
datetime.utcnow -> datetime.now(UTC)
Browse files Browse the repository at this point in the history
Fixes deprecation warnings in Python 3.12
  • Loading branch information
psi29a authored Jun 11, 2024
1 parent dfce571 commit 44bef32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eve/methods/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import time
from collections import Counter
from copy import copy
from datetime import datetime, timezone
from datetime import datetime, UTC
from functools import wraps

import simplejson as json
Expand Down Expand Up @@ -1531,4 +1531,4 @@ def oplog_push(resource, document, op, id=None):


def utcnow():
return datetime.utcnow().replace(microsecond=0, tzinfo=timezone.utc)
return datetime.now(UTC).replace(microsecond=0)

0 comments on commit 44bef32

Please sign in to comment.