Convert datetimes to aware datetimes with UTC.

Naive datetimes will now be interpreted as local time throughout
the library.
This commit is contained in:
Rapptz
2021-04-04 23:54:08 -04:00
parent fd58371f53
commit ff7094ce96
15 changed files with 83 additions and 61 deletions

View File

@ -1013,6 +1013,7 @@ class ConnectionState:
if member is not None:
timestamp = datetime.datetime.utcfromtimestamp(data.get('timestamp'))
timestamp = timestamp.replace(tzinfo=datetime.timezone.utc)
self.dispatch('typing', channel, member, timestamp)
def _get_reaction_user(self, channel, user_id):