aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-03-25 20:37:57 +0000
committerGravatar Chris <[email protected]>2021-03-25 20:37:57 +0000
commit3114b48aa4f943726b6afbbc34bc2b02ebec0930 (patch)
tree4698aa616750e78a34de38cbc2b3b3bb8e2f55aa
parentOnly fetch claimant id once (diff)
Change help channel caching logic to use timezone naive stamps
-rw-r--r--bot/exts/help_channels/_message.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/help_channels/_message.py b/bot/exts/help_channels/_message.py
index 074fd01da..9506f7edd 100644
--- a/bot/exts/help_channels/_message.py
+++ b/bot/exts/help_channels/_message.py
@@ -1,7 +1,7 @@
import logging
import textwrap
import typing as t
-from datetime import datetime, timezone
+from datetime import datetime
import discord
@@ -49,8 +49,8 @@ async def update_message_caches(message: discord.Message) -> None:
# Confirm the channel is an in use help channel
if is_in_category(channel, constants.Categories.help_in_use):
log.trace(f"Checking if #{channel} ({channel.id}) has had a reply.")
- # Must use a timezone-aware datetime to ensure a correct POSIX timestamp.
- timestamp = datetime.now(timezone.utc).timestamp()
+ # Use datetime naive time stamp to be consistant with timestamps from discord.
+ timestamp = datetime.now().timestamp()
claimant_id = await _caches.claimants.get(channel.id)