Skip to content

v2.7.0: Unified timezone — auto-reads from openclaw.json

Choose a tag to compare

@ZackO2o ZackO2o released this 09 Apr 19:41
· 5 commits to main since this release

Critical Fix

  • Date mismatch between scripts and OpenClaw memory-flush: OpenClaw uses agents.defaults.userTimezone to compute dates, but our scripts used TZ env var (often unset → UTC in cron environments). This caused cross-day mismatches:
    • Example: At UTC 02:00, OpenClaw (NY timezone) writes memory/2026-04-09.md, but scripts (UTC) would write memory/2026-04-10.md
    • Health check would falsely report "No log for today"
    • All fixed: scripts now auto-read userTimezone from openclaw.json

New

  • _timezone.js shared module: All 6 scripts use the same timezone source
  • Resolution order: OPENCLAW_TZ env > openclaw.json > TZ env > /etc/timezone > /etc/localtime symlink > UTC
  • memory-cron.sh also reads from openclaw.json

Verified

  • UTC, America/New_York, Asia/Shanghai, Asia/Tokyo, Europe/London, Australia/Sydney
  • Cross-day boundary scenarios
  • Cron environment (no TZ set)
  • Date matches OpenClaw's formatDateStampInTimezone() output exactly