Skip to content

Commit

Permalink
fix(responses): remove deprecated use of utcnow
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Apr 11, 2024
1 parent 78f0a88 commit 397704d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bento_lib/responses/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import datetime
from datetime import datetime, timezone
from functools import partial
from werkzeug.http import HTTP_STATUS_CODES

Expand Down Expand Up @@ -58,7 +58,7 @@ def http_error(
return {
"code": code,
"message": message,
"timestamp": datetime.datetime.utcnow().isoformat("T") + "Z",
"timestamp": datetime.now(timezone.utc).isoformat("T").split("+")[0] + "Z",
**({"errors": [_error_message(e) for e in errors]} if errors else {}),

# The DRS spec has a slightly different error specification - if a
Expand Down

0 comments on commit 397704d

Please sign in to comment.