Skip to content

Commit

Permalink
Replaced the deprecating function datatime.utcnow(). (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyuepan authored Mar 10, 2024
1 parent 698ff22 commit f8e498e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions watchtower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import time
import warnings
from collections.abc import Mapping
from datetime import date, datetime
from datetime import date, datetime, timezone
from operator import itemgetter
from typing import Any, Callable, List, Optional, Tuple

Expand Down Expand Up @@ -314,7 +314,7 @@ def _get_stream_name(self, message):
process_id=os.getpid(),
thread_name=threading.current_thread().name,
logger_name=message.name,
strftime=datetime.utcnow(),
strftime=datetime.now(timezone.utc),
)

def _size(self, msg):
Expand Down

0 comments on commit f8e498e

Please sign in to comment.