From 6c80855829082219c9a0aca0f8843b7e8f4e78ef Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Tue, 1 Jun 2021 14:12:31 -0700 Subject: [PATCH] Fix datetime reporting for servers of all timezones --- discordbot/titanembeds/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discordbot/titanembeds/utils.py b/discordbot/titanembeds/utils.py index 271d5ab..4bd3eeb 100644 --- a/discordbot/titanembeds/utils.py +++ b/discordbot/titanembeds/utils.py @@ -3,7 +3,7 @@ import time from email import utils as emailutils def format_datetime(datetimeobj): - return emailutils.formatdate(time.mktime(datetimeobj.timetuple())) # https://stackoverflow.com/questions/3453177/convert-python-datetime-to-rfc-2822 + return emailutils.format_datetime(datetimeobj) # https://stackoverflow.com/questions/3453177/convert-python-datetime-to-rfc-2822 def get_formatted_message(message): edit_ts = message.edited_at