Summary
Console log timestamps (e.g. 01:01:39 [canvas], 01:00:31 [ws]) are always displayed in UTC, even when:
- System timezone is set to
Asia/Tokyo (JST, UTC+9)
env.TZ: "Asia/Tokyo" is configured in openclaw.json
logging.consoleStyle: "pretty" is set
Root cause (from source)
In subsystem-DkqfG4LL.js, formatConsoleLine() uses:
if (opts.style === "pretty") return color.gray((new Date()).toISOString().slice(11, 19));
toISOString() always returns UTC. Slicing [11,19] extracts HH:MM:SS in UTC, ignoring the local timezone entirely. This applies to all pretty and compact styles.
Expected behavior
Log timestamps should reflect the local timezone (as configured via TZ env or system timezone).
Suggested fix
Replace toISOString().slice(11, 19) with local-time methods:
if (opts.style === "pretty") {
const h = String(now.getHours()).padStart(2, "0");
const m = String(now.getMinutes()).padStart(2, "0");
const s = String(now.getSeconds()).padStart(2, "0");
return color.gray(`${h}:${m}:${s}`);
}
Environment
- OpenClaw version: 2026.2.23 (b817600)
- OS: Linux (WSL2)
- System TZ: Asia/Tokyo
- Node.js: v24.13.0
Summary
Console log timestamps (e.g.
01:01:39 [canvas],01:00:31 [ws]) are always displayed in UTC, even when:Asia/Tokyo(JST, UTC+9)env.TZ: "Asia/Tokyo"is configured inopenclaw.jsonlogging.consoleStyle: "pretty"is setRoot cause (from source)
In
subsystem-DkqfG4LL.js,formatConsoleLine()uses:toISOString()always returns UTC. Slicing[11,19]extractsHH:MM:SSin UTC, ignoring the local timezone entirely. This applies to allprettyandcompactstyles.Expected behavior
Log timestamps should reflect the local timezone (as configured via
TZenv or system timezone).Suggested fix
Replace
toISOString().slice(11, 19)with local-time methods:Environment