aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content
diff options
context:
space:
mode:
authorGravatar Rohan Reddy Alleti <[email protected]>2023-05-17 12:11:32 +0530
committerGravatar GitHub <[email protected]>2023-05-17 12:11:32 +0530
commit763027f43a843fee1902834354e849dd1772e495 (patch)
tree7a06695aab0a5111d9b69b9c5034b9bfc4ed3294 /pydis_site/apps/content
parentgive a simple introduction to cogs and example links (diff)
parentMerge 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/content')
-rw-r--r--pydis_site/apps/content/tests/test_utils.py2
-rw-r--r--pydis_site/apps/content/utils.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/content/tests/test_utils.py b/pydis_site/apps/content/tests/test_utils.py
index 462818b5..7f7736f9 100644
--- a/pydis_site/apps/content/tests/test_utils.py
+++ b/pydis_site/apps/content/tests/test_utils.py
@@ -17,7 +17,7 @@ from pydis_site.apps.content.tests.helpers import (
BASE_PATH, MockPagesTestCase, PARSED_CATEGORY_INFO, PARSED_HTML, PARSED_METADATA
)
-_time = datetime.datetime(2022, 10, 10, 10, 10, 10, tzinfo=datetime.timezone.utc)
+_time = datetime.datetime(2022, 10, 10, 10, 10, 10, tzinfo=datetime.UTC)
_time_str = _time.strftime(settings.GITHUB_TIMESTAMP_FORMAT)
TEST_COMMIT_KWARGS = {
"sha": "123",
diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py
index 347640dd..56f6283d 100644
--- a/pydis_site/apps/content/utils.py
+++ b/pydis_site/apps/content/utils.py
@@ -132,7 +132,7 @@ def set_tag_commit(tag: Tag) -> None:
tag.last_commit = Commit(
sha="68da80efc00d9932a209d5cccd8d344cec0f09ea",
message="Initial Commit\n\nTHIS IS FAKE DEMO DATA",
- date=datetime.datetime(2018, 2, 3, 12, 20, 26, tzinfo=datetime.timezone.utc),
+ date=datetime.datetime(2018, 2, 3, 12, 20, 26, tzinfo=datetime.UTC),
authors=json.dumps([{"name": "Joseph", "email": "[email protected]"}]),
)
return
@@ -154,7 +154,7 @@ def set_tag_commit(tag: Tag) -> None:
date = (
datetime.datetime
.strptime(committer["date"], settings.GITHUB_TIMESTAMP_FORMAT)
- .replace(tzinfo=datetime.timezone.utc)
+ .replace(tzinfo=datetime.UTC)
)
if author["email"] == committer["email"]: