Skip to content

Commit 726d273

Browse files
committed
utcnow is deprecated
1 parent eed7df0 commit 726d273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def intercept_send(response):
9393
start_time = time.time()
9494

9595
log_data = {
96-
"@timestamp": datetime.utcnow().replace(tzinfo=timezone.utc).strftime("%Y-%m-%dT%H:%M:%S"),
96+
"@timestamp": datetime.now().replace(tzinfo=timezone.utc).strftime("%Y-%m-%dT%H:%M:%S"),
9797
"environment": self.environment,
9898
"method": request.method,
9999
"path": request.url.path,

0 commit comments

Comments
 (0)