diff options
| author | 2021-03-25 20:37:57 +0000 | |
|---|---|---|
| committer | 2021-03-25 20:37:57 +0000 | |
| commit | 3114b48aa4f943726b6afbbc34bc2b02ebec0930 (patch) | |
| tree | 4698aa616750e78a34de38cbc2b3b3bb8e2f55aa | |
| parent | Only fetch claimant id once (diff) | |
Change help channel caching logic to use timezone naive stamps
| -rw-r--r-- | bot/exts/help_channels/_message.py | 6 |
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) |