Skip to content

fix(openclaw): label "Current time" as UTC in injected memory context#1804

Merged
nicoloboschi merged 1 commit into
mainfrom
feat/openclaw-utc-label-1789
May 28, 2026
Merged

fix(openclaw): label "Current time" as UTC in injected memory context#1804
nicoloboschi merged 1 commit into
mainfrom
feat/openclaw-utc-label-1789

Conversation

@nicoloboschi

@nicoloboschi nicoloboschi commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Append UTC to the Current time - header injected above recalled memories so the LLM doesn't misread it as local time. This is the same fix that landed for the Claude Code integration in #1568 — the OpenClaw integration was overlooked.

Why

From #1789:

The Current time - 2026-05-27 16:25 line is read as local time and the LLM makes wrong temporal judgments.

The issue also requested an opt-out for the per-memory (YYYY-MM-DDTHH:MM:SS+00:00) suffix; that's been intentionally dropped from this PR to keep the scope minimal.

What changed

  • formatCurrentTimeForRecall now appends UTC and is exported for direct unit testing.
  • 2 new tests cover the UTC-label rendering and zero-padding edge case.

Test plan

  • npx vitest run in hindsight-integrations/openclaw/ — 233/233 pass, including new cases
  • ./scripts/hooks/lint.sh — green

Closes #1789

Append ` UTC` to the `Current time -` header injected above recalled
memories. Without the label the LLM read the timestamp as local time and
made wrong recency judgments. This is the same fix that landed for the
Claude Code integration in #1568 — the OpenClaw integration was overlooked.

Closes #1789
@nicoloboschi nicoloboschi force-pushed the feat/openclaw-utc-label-1789 branch from 0bae380 to bd3ddf4 Compare May 28, 2026 09:06
@nicoloboschi nicoloboschi changed the title feat(openclaw): label Current time as UTC + allow disabling per-memory timestamps fix(openclaw): label "Current time" as UTC in injected memory context May 28, 2026
@nicoloboschi nicoloboschi merged commit dc41f6a into main May 28, 2026
57 checks passed
@nicoloboschi nicoloboschi deleted the feat/openclaw-utc-label-1789 branch May 28, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: OpenClaw integration — allow disabling UTC timestamp suffix on context-injected memories

1 participant