Skip to content

fix: include weekday in message timestamps so agent knows the correct…#1098

Open
thomaslok0516 wants to merge 1 commit into
nanocoai:mainfrom
thomaslok0516:fix/timestamp-weekday
Open

fix: include weekday in message timestamps so agent knows the correct…#1098
thomaslok0516 wants to merge 1 commit into
nanocoai:mainfrom
thomaslok0516:fix/timestamp-weekday

Conversation

@thomaslok0516

@thomaslok0516 thomaslok0516 commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Skill - adds a new skill in .claude/skills/
  • Fix - bug fix or security fix to source code
  • Simplification - reduces or simplifies source code

Description

formatLocalTime in src/timezone.ts produced timestamps like Mar 9,
2026, 11:59 AM with no weekday. The agent had to infer the day of the week
from the date string alone, and LLMs are unreliable at computing calendar
weekdays for arbitrary dates.

Changes

  • Added weekday: 'long' to the Intl.DateTimeFormat options in formatLocalTime,
    so the output now includes the full weekday name

  • Updated src/timezone.test.ts to assert the weekday name is present in the
    output.

Test plan

  • Unit tests pass (npx vitest run src/timezone.test.ts)
  • Built successfully (npm run build)
  • Manually verified on live Telegram session — agent now correctly
    identifies the day of the week without inference errors

@thomaslok0516

thomaslok0516 commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

Fixs #1097

… day

Without weekday in the formatted timestamp, the agent had to infer the
day of the week from its training knowledge and sometimes got it wrong
(e.g. treating Monday as Sunday). Adding weekday: 'long' makes the day
explicit in every message context passed to the container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thomaslok0516 thomaslok0516 force-pushed the fix/timestamp-weekday branch from a2ae929 to 7e2473a Compare March 25, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Fix Bug fix Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants