From 261fa285f316b1bfe0b7990ee064d1eab7236531 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 29 Sep 2022 23:32:01 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=B7=B1=E6=B8=8A?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Info/abyss_statistics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py b/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py index cb06ea5..e8c6b07 100644 --- a/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py +++ b/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py @@ -1,6 +1,8 @@ import datetime from typing import Dict, Any, Tuple from collections import defaultdict + +import pytz from nonebot import get_bot from LittlePaimon.database.models import AbyssInfo from LittlePaimon.utils import aiorequests @@ -32,7 +34,7 @@ async def get_statistics(group_id: int): member_id_list = [str(member['user_id']) for member in member_list] info_list = [info for info in info_list if info.user_id in member_id_list and info.total_battle and info.total_star and info.max_damage and info.max_take_damage] - now = datetime.datetime.now() + now = datetime.datetime.now().replace(tzinfo=pytz.timezone('Asia/Shanghai')) info_list = [info for info in info_list if info.start_time <= now <= info.end_time] if not info_list: return '本群还没有深渊战斗数据哦!'