diff options
author | 2023-05-17 12:11:32 +0530 | |
---|---|---|
committer | 2023-05-17 12:11:32 +0530 | |
commit | 763027f43a843fee1902834354e849dd1772e495 (patch) | |
tree | 7a06695aab0a5111d9b69b9c5034b9bfc4ed3294 /pydis_site/apps/api/models/bot | |
parent | give a simple introduction to cogs and example links (diff) | |
parent | Merge pull request #976 from python-discord/dependabot/pip/sentry-sdk-1.23.0 (diff) |
Merge branch 'main' into subclassing_bot
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r-- | pydis_site/apps/api/models/bot/message.py | 2 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/offensive_message.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/api/models/bot/message.py b/pydis_site/apps/api/models/bot/message.py index fb3c47fc..f90f5dd0 100644 --- a/pydis_site/apps/api/models/bot/message.py +++ b/pydis_site/apps/api/models/bot/message.py @@ -68,5 +68,5 @@ class Message(ModelReprMixin, models.Model): """Attribute that represents the message timestamp as derived from the snowflake id.""" return datetime.datetime.fromtimestamp( ((self.id >> 22) + 1420070400000) / 1000, - tz=datetime.timezone.utc, + tz=datetime.UTC, ) diff --git a/pydis_site/apps/api/models/bot/offensive_message.py b/pydis_site/apps/api/models/bot/offensive_message.py index 74dab59b..41805a16 100644 --- a/pydis_site/apps/api/models/bot/offensive_message.py +++ b/pydis_site/apps/api/models/bot/offensive_message.py @@ -9,7 +9,7 @@ from pydis_site.apps.api.models.mixins import ModelReprMixin def future_date_validator(date: datetime.date) -> None: """Raise ValidationError if the date isn't a future date.""" - if date < datetime.datetime.now(datetime.timezone.utc): + if date < datetime.datetime.now(datetime.UTC): raise ValidationError("Date must be a future date") |