Simplify embed timestamp code due to it being fixed Discord side.

See https://github.com/hammerandchisel/discord-api-docs/issues/291
This commit is contained in:
Rapptz 2017-07-09 15:52:50 -04:00
parent 6c67910fa9
commit 1d3bb1f510

View File

@ -460,14 +460,7 @@ class Embed:
pass
else:
if timestamp:
try:
aware = timestamp.astimezone(datetime.timezone.utc)
except ValueError:
# naive date time
result['timestamp'] = timestamp.isoformat()
else:
result['timestamp'] = aware.isoformat().replace('+00:00', 'Z')
# add in the non raw attribute ones
if self.type: