aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-07-09 15:52:50 -0400
committerRapptz <[email protected]>2017-07-09 15:52:50 -0400
commit1d3bb1f510fd8be5c686d129ff48110b1dcaf8bb (patch)
treed3184d4f2e3d14ef6a95bf0956e7f0687dea4c92
parentRemove Invite.accept. (diff)
downloaddiscord.py-1d3bb1f510fd8be5c686d129ff48110b1dcaf8bb.tar.xz
discord.py-1d3bb1f510fd8be5c686d129ff48110b1dcaf8bb.zip
Simplify embed timestamp code due to it being fixed Discord side.
See https://github.com/hammerandchisel/discord-api-docs/issues/291
-rw-r--r--discord/embeds.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/discord/embeds.py b/discord/embeds.py
index bc937b50..2e18687b 100644
--- a/discord/embeds.py
+++ b/discord/embeds.py
@@ -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')
-
+ result['timestamp'] = timestamp.isoformat()
# add in the non raw attribute ones
if self.type: