diff --git a/LittlePaimon/plugins/Paimon_Abyss/abyss_statistics.py b/LittlePaimon/plugins/Paimon_Abyss/abyss_statistics.py index d63b93a..2b2e862 100644 --- a/LittlePaimon/plugins/Paimon_Abyss/abyss_statistics.py +++ b/LittlePaimon/plugins/Paimon_Abyss/abyss_statistics.py @@ -40,7 +40,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().replace(tzinfo=pytz.timezone('UTC')) + 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 '本群还没有深渊战斗数据哦!' diff --git a/LittlePaimon/plugins/Paimon_DailyNote/handler.py b/LittlePaimon/plugins/Paimon_DailyNote/handler.py index 16349da..9fef91f 100644 --- a/LittlePaimon/plugins/Paimon_DailyNote/handler.py +++ b/LittlePaimon/plugins/Paimon_DailyNote/handler.py @@ -90,7 +90,7 @@ async def check_note(): if sub.today_remind_num <= limit_num and ( sub.last_remind_time is None or (sub.last_remind_time is not None and ( sub.last_remind_time + datetime.timedelta(minutes=30) <= datetime.datetime.now().replace( - tzinfo=pytz.timezone('UTC'))))): + tzinfo=pytz.timezone('Asia/Shanghai'))))): data = await get_mihoyo_private_data(sub.uid, str(sub.user_id), 'daily_note') if isinstance(data, str): logger.info('原神实时便签', '➤', {'用户': sub.user_id, 'UID': sub.uid}, 'Cookie未绑定或已失效,删除任务', False) diff --git a/LittlePaimon/utils/genshin.py b/LittlePaimon/utils/genshin.py index dca36e8..a3f6496 100644 --- a/LittlePaimon/utils/genshin.py +++ b/LittlePaimon/utils/genshin.py @@ -172,7 +172,7 @@ class GenshinInfoManager: character = await Character.get_or_none(**query, data_source='enka') if not character or character.update_time < ( datetime.datetime.now() - datetime.timedelta(hours=config.ysd_auto_update)).replace( - tzinfo=pytz.timezone('UTC')): + tzinfo=pytz.timezone('Asia/Shanghai')): try: await self.update_from_enka() except Exception as e: @@ -204,7 +204,7 @@ class GenshinInfoManager: player_info = await PlayerInfo.get_or_none(user_id=self.user_id, uid=self.uid) if player_info is None or player_info.update_time is None or player_info.update_time < ( datetime.datetime.now() - datetime.timedelta(hours=config.ysa_auto_update)).replace( - tzinfo=pytz.timezone('UTC')): + tzinfo=pytz.timezone('Asia/Shanghai')): result = await self.update_from_mihoyo() if result != '更新成功': return result, [] @@ -221,7 +221,7 @@ class GenshinInfoManager: player_info = await PlayerInfo.get_or_none(user_id=self.user_id, uid=self.uid) if player_info is None or player_info.update_time is None or player_info.update_time < ( datetime.datetime.now() - datetime.timedelta(hours=config.ys_auto_update)).replace( - tzinfo=pytz.timezone('UTC')): + tzinfo=pytz.timezone('Asia/Shanghai')): result = await self.update_from_mihoyo() if result != '更新成功': return result, None