Fix datetime reporting for servers of all timezones

This commit is contained in:
Jeremy Zhang 2021-06-01 14:12:31 -07:00
parent cf03c70398
commit 6c80855829

View File

@ -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