From 0b59a5e8d110e1aa7e5d76addcf6a92ee5f89ace Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Mon, 20 Sep 2021 17:20:27 +0200 Subject: Emoji: make the datetimes offset-naive You know the drill, due to discord.py 2.0a0 datetimes are now offset-aware, breaking some code. Closes python-discord/sir-lancebot#875 --- bot/exts/utilities/emoji.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/utilities/emoji.py b/bot/exts/utilities/emoji.py index 55d6b8e9..83df39cc 100644 --- a/bot/exts/utilities/emoji.py +++ b/bot/exts/utilities/emoji.py @@ -107,8 +107,8 @@ class Emojis(commands.Cog): title=f"Emoji Information: {emoji.name}", description=textwrap.dedent(f""" **Name:** {emoji.name} - **Created:** {time_since(emoji.created_at, precision="hours")} - **Date:** {datetime.strftime(emoji.created_at, "%d/%m/%Y")} + **Created:** {time_since(emoji.created_at.replace(tzinfo=None), precision="hours")} + **Date:** {datetime.strftime(emoji.created_at.replace(tzinfo=None), "%d/%m/%Y")} **ID:** {emoji.id} """), color=Color.blurple(), -- cgit v1.2.3