openclaw - 💡(How to fix) Fix Agent context shows incorrect time (3-5 hours offset) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#44509Fetched 2026-04-08 00:45:55
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
1
Timeline (top)
commented ×1

The time shown in the agent context is incorrect - it shows a time that is 3-5 hours different from the actual system time.

Root Cause

The time shown in the agent context is incorrect - it shows a time that is 3-5 hours different from the actual system time.

RAW_BUFFERClick to expand / collapse

Description

The time shown in the agent context is incorrect - it shows a time that is 3-5 hours different from the actual system time.

Environment

  • macOS 26.3.1 (arm64)
  • OpenClaw version: 2026.3.11
  • Node: v22.22.0
  • Timezone: Asia/Shanghai (CST)

Steps to reproduce

  1. Start OpenClaw gateway
  2. Connect via TUI or any client
  3. Check the time shown in agent context (Current Date & Time)

Expected behavior

The agent should see the correct current time (approximately 09:23 CST when this issue was filed).

Actual behavior

The agent sees a time that is 3-5 hours behind. The offset is not consistent - sometimes it's ~3 hours, sometimes ~5 hours.

Additional notes

  • System time is correct: date shows the right time
  • Gateway was restarted but the issue persists
  • Cron jobs seem to execute at correct times (based on schedule)
  • This affects the agent's ability to accurately determine the current time

Relevant code

The time formatting appears to be in src/agents/date-time.ts using resolveUserTimezone and formatUserTime functions.

extent analysis

Fix Plan

The fix involves adjusting the timezone handling in the resolveUserTimezone and formatUserTime functions.

Steps:

  1. Update resolveUserTimezone function: Ensure it correctly resolves the user's timezone to CST (Asia/Shanghai).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The agent should see the correct current time (approximately 09:23 CST when this issue was filed).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Agent context shows incorrect time (3-5 hours offset) [1 comments, 2 participants]