openclaw - 💡(How to fix) Fix [Bug] Agent timezone desync causes perception drift in multi-timezone setups [3 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#74241Fetched 2026-04-30 06:26:51
View on GitHub
Comments
3
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
commented ×3cross-referenced ×1

Root Cause

Root cause: Gateway knows user's timezone from message metadata but does not inject it as a runtime variable. Agent defaults to container's system clock.

Code Example

User-Timezone: Europe/London
User-Local-Time: 2026-04-29 10:04:00 BST
Container-Time: 2026-04-29 11:04:00 CEST
RAW_BUFFERClick to expand / collapse

Bug: Agent timezone desync — container clock vs user local time

Priority: MEDIUM

Problem: The OpenClaw agent runs inside a Docker container with its own system timezone (CEST/Europe). The user operates in a different timezone (BST/UK = UTC+1). This creates a permanent 1-2 hour perception gap.

Real example (2026-04-29):

  • Container sees: 11:04 CEST
  • User sees: 10:04 BST
  • Agent calculated "1h33 min to flight" based on 11:04 — but user was at 10:04 → wrong math in conversation

Root cause: Gateway knows user's timezone from message metadata but does not inject it as a runtime variable. Agent defaults to container's system clock.

Proposed solution — User timezone injection: Inject in every agent turn:

User-Timezone: Europe/London
User-Local-Time: 2026-04-29 10:04:00 BST
Container-Time: 2026-04-29 11:04:00 CEST

Impact: Heartbeat scheduling, travel coordination, calendar reasoning — all time-based conversations are slightly off for multi-timezone users.

Acceptance criteria:

  1. Agent can access user's local timezone in every turn
  2. Time-based reasoning uses user-local-time, not container time
  3. No regression for existing cron/heartbeat behavior
  4. Per-user timezone config in agent profile

Labels: bug, enhancement, timezone

extent analysis

TL;DR

Inject the user's timezone as a runtime variable into the agent to synchronize the timezone and prevent the perception gap.

Guidance

  • Verify that the gateway can extract the user's timezone from message metadata and make it available to the agent.
  • Update the agent to use the injected user-local-time for time-based conversations instead of relying on the container's system clock.
  • Test the solution with different timezone scenarios to ensure correct time-based reasoning and no regression in existing cron/heartbeat behavior.
  • Consider implementing per-user timezone configuration in the agent profile to accommodate users in different timezones.

Example

# Example of injecting user timezone and local time
user_timezone = "Europe/London"
user_local_time = "2026-04-29 10:04:00 BST"
container_time = "2026-04-29 11:04:00 CEST"

# Use user_local_time for time-based conversations
time_to_flight = calculate_time_to_flight(user_local_time)

Notes

The proposed solution assumes that the gateway can extract the user's timezone from message metadata. If this is not possible, an alternative solution may be needed.

Recommendation

Apply the workaround of injecting the user's timezone as a runtime variable into the agent, as it directly addresses the root cause of the issue and ensures correct time-based reasoning for users in different timezones.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING