diff --git a/conf/views.py b/conf/views.py index be73744..dbb6618 100644 --- a/conf/views.py +++ b/conf/views.py @@ -7,7 +7,6 @@ import smtplib import time from datetime import datetime -import pytz import requests from django.conf import settings from django.utils import timezone @@ -226,7 +225,7 @@ class DashboardInfoAPI(APIView): def get(self, request): today = datetime.today() today_submission_count = Submission.objects.filter( - create_time__gte=datetime(today.year, today.month, today.day, 0, 0, tzinfo=pytz.UTC)).count() + create_time__gte=datetime(today.year, today.month, today.day, 0, 0)).count() recent_contest_count = Contest.objects.exclude(end_time__lt=timezone.now()).count() judge_server_count = len(list(filter(lambda x: x.status == "normal", JudgeServer.objects.all()))) return self.success({ diff --git a/deploy/requirements.txt b/deploy/requirements.txt index df890cd..3db2059 100644 --- a/deploy/requirements.txt +++ b/deploy/requirements.txt @@ -18,7 +18,6 @@ pillow==10.2.0 psycopg==3.1.19 psycopg-binary==3.1.19 python-dateutil==2.8.2 -pytz==2024.1 qrcode==7.4.2 raven==6.10.0 XlsxWriter==3.2.0