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)"
This commit is contained in:
@@ -467,24 +467,18 @@ async def cmd_update(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None:
|
|||||||
changes.append(f"Link: {old_link} → {link}")
|
changes.append(f"Link: {old_link} → {link}")
|
||||||
if due_date_ts is not None:
|
if due_date_ts is not None:
|
||||||
old_date = (
|
old_date = (
|
||||||
datetime.fromtimestamp(old_bounty.due_date_ts, tz=tz).strftime(
|
format_due_date(old_bounty.due_date_ts, timezone_str)
|
||||||
"%d %b %Y %H:%M"
|
|
||||||
)
|
|
||||||
if old_bounty.due_date_ts
|
if old_bounty.due_date_ts
|
||||||
else "(none)"
|
else "(none)"
|
||||||
)
|
)
|
||||||
new_date = datetime.fromtimestamp(due_date_ts, tz=tz).strftime(
|
new_date = format_due_date(due_date_ts, timezone_str)
|
||||||
"%d %b %Y %H:%M"
|
|
||||||
)
|
|
||||||
changes.append(f"Date: {old_date} → {new_date}")
|
changes.append(f"Date: {old_date} → {new_date}")
|
||||||
if clear_link:
|
if clear_link:
|
||||||
old_link = old_bounty.link or "(none)"
|
old_link = old_bounty.link or "(none)"
|
||||||
changes.append(f"Link: {old_link} → (cleared)")
|
changes.append(f"Link: {old_link} → (cleared)")
|
||||||
if clear_date:
|
if clear_date:
|
||||||
old_date = (
|
old_date = (
|
||||||
datetime.fromtimestamp(old_bounty.due_date_ts, tz=tz).strftime(
|
format_due_date(old_bounty.due_date_ts, timezone_str)
|
||||||
"%d %b %Y %H:%M"
|
|
||||||
)
|
|
||||||
if old_bounty.due_date_ts
|
if old_bounty.due_date_ts
|
||||||
else "(none)"
|
else "(none)"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user