diff --git a/chatexchange_extension.py b/chatexchange_extension.py index 6b6a7bfaa4..3a097296fd 100644 --- a/chatexchange_extension.py +++ b/chatexchange_extension.py @@ -1,16 +1,16 @@ # coding=utf-8 from chatexchange import client, events, rooms import sys -from datetime import datetime +from datetime import datetime, timezone from helpers import log class Room(rooms.Room): def watch_socket(self, event_callback): - self._client.last_activity = datetime.now(datetime.UTC) + self._client.last_activity = datetime.now(tz=timezone.utc) def on_activity(activity): - self._client.last_activity = datetime.now(datetime.UTC) + self._client.last_activity = datetime.now(tz=timezone.utc) for event in self._events_from_activity(activity, self.id): if isinstance(event, events.MessageEdited):