From b68bde48b8564c298efa786f868b01558b9bb47d Mon Sep 17 00:00:00 2001 From: Jeff Schaller <17769792+jeffschaller@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:28:49 -0400 Subject: [PATCH] Update chatexchange_extension.py --- chatexchange_extension.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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):