diff --git a/bot/handlers/callback.py b/bot/handlers/callback.py index 97c9c46..e07dbda 100644 --- a/bot/handlers/callback.py +++ b/bot/handlers/callback.py @@ -1,5 +1,6 @@ from datetime import datetime, timedelta, timezone +import pytz from telegram import Update from telegram.ext import ContextTypes @@ -38,8 +39,10 @@ async def handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -> lambda ctx: execute_reminder(reminder_id, ctx.bot), when=snooze_time, ) + tz = pytz.timezone("Asia/Shanghai") + display_time = snooze_time.astimezone(tz).strftime('%H:%M') await query.edit_message_text( - f"⏰ 已延期10分钟,将在 {snooze_time.strftime('%H:%M')} 再次提醒。" + f"⏰ 已延期10分钟,将在 {display_time} 再次提醒。" ) elif action == "pause":