Fix Embed.to_dict to work with TZ aware datetime objects.

This commit is contained in:
Rapptz 2019-03-15 05:56:01 -04:00
parent 3527203e07
commit 70c5f1723f

View File

@ -509,7 +509,7 @@ class Embed:
pass pass
else: else:
if timestamp: if timestamp:
result['timestamp'] = timestamp.isoformat() result['timestamp'] = timestamp.astimezone(tz=datetime.timezone.utc).isoformat()
# add in the non raw attribute ones # add in the non raw attribute ones
if self.type: if self.type: