From 1bde18589c0f77077e6e97dec8786632043c2684 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:18:45 +0000 Subject: [PATCH] fix: unify date format in add and edit confirmations Now uses format_due_date() for edit confirmation dates, matching the add confirmation format: "5 April 2026 13:00 (Asia/Jakarta)" --- apps/telegram-bot/commands.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/telegram-bot/commands.py b/apps/telegram-bot/commands.py index e20fb75..69c0161 100644 --- a/apps/telegram-bot/commands.py +++ b/apps/telegram-bot/commands.py @@ -467,24 +467,18 @@ async def cmd_update(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None: changes.append(f"Link: {old_link} → {link}") if due_date_ts is not None: old_date = ( - datetime.fromtimestamp(old_bounty.due_date_ts, tz=tz).strftime( - "%d %b %Y %H:%M" - ) + format_due_date(old_bounty.due_date_ts, timezone_str) if old_bounty.due_date_ts else "(none)" ) - new_date = datetime.fromtimestamp(due_date_ts, tz=tz).strftime( - "%d %b %Y %H:%M" - ) + new_date = format_due_date(due_date_ts, timezone_str) changes.append(f"Date: {old_date} → {new_date}") if clear_link: old_link = old_bounty.link or "(none)" changes.append(f"Link: {old_link} → (cleared)") if clear_date: old_date = ( - datetime.fromtimestamp(old_bounty.due_date_ts, tz=tz).strftime( - "%d %b %Y %H:%M" - ) + format_due_date(old_bounty.due_date_ts, timezone_str) if old_bounty.due_date_ts else "(none)" )