diff options
| author | Rapptz <[email protected]> | 2021-04-04 23:54:08 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-04 23:54:08 -0400 |
| commit | ff7094ce9602bad0b4408761841fa02bdb908987 (patch) | |
| tree | d0d37067183f6827398181e598133146f870fa26 /discord/client.py | |
| parent | Remove some lingering userbot classes in the documentation (diff) | |
| download | discord.py-ff7094ce9602bad0b4408761841fa02bdb908987.tar.xz discord.py-ff7094ce9602bad0b4408761841fa02bdb908987.zip | |
Convert datetimes to aware datetimes with UTC.
Naive datetimes will now be interpreted as local time throughout
the library.
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py index 0c250ee8..52504625 100644 --- a/discord/client.py +++ b/discord/client.py @@ -1076,10 +1076,12 @@ class Client: Defaults to ``100``. before: Union[:class:`.abc.Snowflake`, :class:`datetime.datetime`] Retrieves guilds before this date or object. - If a date is provided it must be a timezone-naive datetime representing UTC time. + If a datetime is provided, it is recommended to use a UTC aware datetime. + If the datetime is naive, it is assumed to be local time. after: Union[:class:`.abc.Snowflake`, :class:`datetime.datetime`] Retrieve guilds after this date or object. - If a date is provided it must be a timezone-naive datetime representing UTC time. + If a datetime is provided, it is recommended to use a UTC aware datetime. + If the datetime is naive, it is assumed to be local time. Raises ------ |