Skip to content

feat(agents): include full date with day of week in system prompt#3698

Closed
Episkey-G wants to merge 1 commit intoopenclaw:mainfrom
Episkey-G:feat/system-prompt-full-date
Closed

feat(agents): include full date with day of week in system prompt#3698
Episkey-G wants to merge 1 commit intoopenclaw:mainfrom
Episkey-G:feat/system-prompt-full-date

Conversation

@Episkey-G
Copy link
Copy Markdown

Summary

Fixes #2108

The system prompt now displays the full current date and time when userTime is available, including day of week.

Problem

Previously, the system prompt only showed the timezone:

## Current Date & Time
Time zone: Europe/London

The agent had to infer the current date from message timestamps (which only show YYYY-MM-DD without day of week), leading to confident but incorrect day-of-week statements (e.g., saying "Sunday" when it's actually Monday).

Solution

When userTime is provided, the system prompt now displays:

## Current Date & Time
Current: Monday, 26 January 2026, 06:53 GMT
Time zone: Europe/London

This eliminates day-of-week guessing errors entirely.

Changes

  • Modified buildTimeSection in system-prompt.ts:52-60 to accept and display userTime parameter
  • Updated function call to pass userTime to buildTimeSection
  • Updated tests to verify userTime appears correctly in system prompt
  • Format: Current: <full date> followed by Time zone: <timezone>

Testing

  • Updated existing tests to verify the new format
  • Tests confirm both 12-hour and 24-hour time formats display correctly
  • Backward compatible: when userTime is not provided, falls back to timezone-only display

Rebase Note

✅ Rebased onto latest main after Moltbot rename (2026.1.27-beta.1)
✅ Resolved CHANGELOG conflicts
✅ Lint passed

Supersedes #2154 (closed due to merge conflicts)

🤖 Generated with Claude Code

Fixes openclaw#2108

The system prompt now displays the full current date and time when
userTime is available, including day of week (e.g., 'Monday, January 26th, 2026 — 15:30').
This eliminates day-of-week guessing errors where the agent would
confidently state the wrong day based on timestamp inference.

Changes:
- Modified buildTimeSection to accept and display userTime parameter
- Updated tests to verify userTime appears in system prompt
- Format: 'Current: <full date>' followed by 'Time zone: <timezone>'
@clawdinator
Copy link
Copy Markdown
Contributor

clawdinator bot commented Feb 1, 2026

hasta la vista

CLAWDINATOR FIELD REPORT // PR Closure

I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code.

Feature freeze is in effect. We’re purging new feature PRs so the maintainers can focus on stabilization. This PR is in the blast radius, so I’m shutting it down. Hasta la vista, feature — at least for now.

Want it reconsidered after the freeze? Come with me if you want to ship. Head to #pr-thunderdome-dangerzone on Discord — READ THE TOPIC or risk immediate termination. Give the maintainers a clear briefing: what it does, why it matters, how it was tested.

Stay br00tal.

🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Include full date with day of week in system prompt

1 participant