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/integrations.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/integrations.py')
| -rw-r--r-- | discord/integrations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/integrations.py b/discord/integrations.py index bd58d410..8dff155e 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -82,7 +82,7 @@ class Integration: account: :class:`IntegrationAccount` The integration account information. synced_at: :class:`datetime.datetime` - When the integration was last synced. + An aware UTC datetime representing when the integration was last synced. """ __slots__ = ('id', '_state', 'guild', 'name', 'enabled', 'type', @@ -184,7 +184,7 @@ class Integration: Syncing the integration failed. """ await self._state.http.sync_integration(self.guild.id, self.id) - self.synced_at = datetime.datetime.utcnow() + self.synced_at = datetime.datetime.now(datetime.timezone.utc) async def delete(self): """|coro| |