openclaw - ✅(Solved) Fix Dreaming: Dream Diary timestamps use wrong timezone in UI and DREAMS.md [4 pull requests, 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#65027Fetched 2026-04-12 13:25:54
View on GitHub
Comments
1
Participants
2
Timeline
13
Reactions
0
Timeline (top)
referenced ×8cross-referenced ×4commented ×1

The Dreaming diary is showing the wrong local time for generated diary entries.

On my machine, the Control UI Dreaming > Diary view showed entries labeled April 11, 2026 at 9:46 PM, even though the actual local time was about 3:15 PM PDT.

I checked the underlying files and the displayed time does not match the actual dream event timestamp.

Root Cause

The Dreaming diary is showing the wrong local time for generated diary entries.

On my machine, the Control UI Dreaming > Diary view showed entries labeled April 11, 2026 at 9:46 PM, even though the actual local time was about 3:15 PM PDT.

I checked the underlying files and the displayed time does not match the actual dream event timestamp.

Fix Action

Fixed

PR fix notes

PR #65034: [AI-assisted] fix(dreaming): use host local timezone for diary timestamps

Description (problem / solution / changelog)

Summary

Fixes #65027

When memory.dreaming.timezone is not configured, formatNarrativeDate() previously defaulted to 'UTC', causing diary timestamps in DREAMS.md and the Control UI Dreaming > Diary view to display UTC time as though it were the user's local time.

Example from the bug report (PDT user):

  • events.jsonl: 2026-04-11T21:46:55.081Z (UTC)
  • Expected: April 11, 2026 at 2:46 PM (PDT, UTC-7)
  • Actual (before fix): April 11, 2026 at 9:46 PM (UTC rendered without conversion)

Root Cause

formatNarrativeDate() in dreaming-narrative.ts had: \\ s timeZone: timezone ?? 'UTC', \
When timezone is undefined (no user config), this forced UTC. The Intl.DateTimeFormat API natively uses the host's local timezone when timeZone is omitted/undefined, which is the correct behavior for a diary intended for human reading.

Fix

\\diff

  • timeZone: timezone ?? 'UTC',
  • timeZone: timezone, \\

Users who have explicitly set dreaming.timezone or agents.defaults.userTimezone are unaffected — their configured timezone is still respected.

Tests Added

  • applies an explicit timezone: verifies PDT conversion (America/Los_Angeles)
  • uses host local timezone when timezone is undefined (#65027): regression test verifying the output matches Intl.DateTimeFormat with system-default timezone

All 33 existing tests in dreaming-narrative.test.ts continue to pass. The only pre-existing failure (preserves restrictive dreams file permissions) is a known Windows-specific chmod incompatibility unrelated to this change.

Changed files

  • extensions/memory-core/src/dreaming-narrative.test.ts (modified, +30/-0)
  • extensions/memory-core/src/dreaming-narrative.ts (modified, +1/-1)

PR #65057: fix(dreaming): include timezone label in diary timestamps

Description (problem / solution / changelog)

Dream diary timestamps in DREAMS.md show bare times without timezone indicator. When users haven't configured a timezone, UTC times appear to be local time.

Add timeZoneName: "short" to formatNarrativeDate so timestamps always show the timezone (e.g. "9:46 PM UTC" or "2:46 PM PDT").

Fixes #65027

Changed files

  • extensions/memory-core/src/dreaming-narrative.ts (modified, +7/-1)

PR #16: fix(dreaming): show timezone (fixes #65027)

Description (problem / solution / changelog)

Add timeZoneName to display local timezone. Closes #65027

Changed files

  • ui/src/ui/views/dreaming.ts (added, +1474/-0)

PR #65291: fix(dreaming): show timezone in timestamp (fixes #65027)

Description (problem / solution / changelog)

Bug\nDreaming timestamps show wrong timezone.\n\n## Fix\nAdd timeZoneName: short to toLocaleString().\n\nCloses #65027

Changed files

  • src/agents/pi-tools.before-tool-call.integration.test.ts (added, +16/-0)
  • src/infra/exec-allowlist-pattern.test.ts (modified, +14/-0)
  • src/infra/exec-allowlist-pattern.ts (modified, +15/-3)
  • ui/src/ui/views/dreaming.ts (added, +1474/-0)
RAW_BUFFERClick to expand / collapse

Summary

The Dreaming diary is showing the wrong local time for generated diary entries.

On my machine, the Control UI Dreaming > Diary view showed entries labeled April 11, 2026 at 9:46 PM, even though the actual local time was about 3:15 PM PDT.

I checked the underlying files and the displayed time does not match the actual dream event timestamp.

Version

  • OpenClaw v2026.4.10

What I saw

In the Dreaming UI, diary entries were shown as:

  • April 11, 2026 at 9:46 PM

The same wrong time also appears in DREAMS.md.

Underlying evidence

The corresponding event log entry in memory/.dreams/events.jsonl is:

  • 2026-04-11T21:46:55.081Z

That converts to:

  • 2:46 PM PDT

So the displayed 9:46 PM is incorrect.

Why this looks like a bug

This appears to be a timezone/rendering bug in the Dream Diary timestamp layer.

It looks like one of these is happening:

  • a UTC timestamp is being formatted as though it were already local
  • the wrong timezone is being applied during rendering
  • the diary writer and UI renderer are using inconsistent timezone logic

Repro

  1. Enable Dreaming.
  2. Let Dreaming generate diary entries.
  3. Open Control UI > Dreaming > Diary.
  4. Compare the displayed diary timestamp with the actual timestamp in memory/.dreams/events.jsonl.

Expected

The Dream Diary and Control UI should display the correct local time for the dream event.

Actual

The diary/UI shows a time several hours ahead of the real local time.

extent analysis

TL;DR

The issue can likely be resolved by ensuring consistent timezone logic is applied during the rendering of diary timestamps in the Dream Diary and Control UI.

Guidance

  • Verify that the timezone settings are correctly configured in the OpenClaw application and the underlying system to ensure consistency.
  • Check the code responsible for formatting timestamps in the Dream Diary and Control UI to ensure it correctly handles UTC timestamps and applies the local timezone.
  • Compare the timezone logic used by the diary writer and UI renderer to identify any inconsistencies.
  • Test the application with different timezone settings to reproduce the issue and validate any potential fixes.

Example

No specific code example can be provided without more information about the implementation details of the OpenClaw application.

Notes

The root cause of the issue appears to be related to timezone handling, but without more information about the implementation, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround to ensure consistent timezone logic is applied during the rendering of diary timestamps, such as using a library that handles timezone conversions correctly, until a more permanent fix can be implemented.

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