remove pytz

This commit is contained in:
yuetsh
2024-06-11 15:07:48 +08:00
parent c4a5f5a47a
commit 5a8fb8d81a
2 changed files with 1 additions and 3 deletions

View File

@@ -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({

View File

@@ -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