#20915: feat: add configurable timezone support for console log timestamps.
size: S
Cluster:
Timezone Support Enhancements
**Issue Linkage**
Fixes [#20590](https://github.com/openclaw/openclaw/issues/20590)
**Description**
The function implements a manual formatting approach for several specific reasons:
- > Zero Dependencies: This keeps the bundle size small and startup fast.
- > Cross-Platform Consistency: Intl.DateTimeFormat is built into the V8 engine (Node.js), meaning it works identically on Linux, macOS, and Windows without relying on OS-level timezone databases.
- > ISO 8601 with Offset: The standard Date.toISOString() always converts to UTC (ending in Z), losing local context. To get an ISO-like string (YYYY-MM-DDTHH:mm:ss.sss+HH:mm) in a specific timezone without a library requires manually formatting the parts (year, month, day, etc.) and appending the correct offset.
- > Backward Compatibility: The original logging system used system-local time. This function preserves that behavior when no timezone is clearer, while seamlessly supporting configured timezones like Asia/Kolkata or America/New_York when requested.
Update timezone to configs file using below command
```bash
openclaw config set logging.timezone "America/New_York"
```
**This PR is safe to merge, Confidence Score: 5/5**
Most Similar PRs
#21859: fix(logs): respect TZ env var for timestamp display, fix Windows ti...
by hydro13 · 2026-02-20
74.8%
#14709: fix: display local timezone in console logs
by Daiyimo · 2026-02-12
70.7%
#19611: fix: use local timezone in log file and console timestamps
by tag-assistant · 2026-02-18
66.8%
#7919: feat: implement timezone support for console timestamps and add ver...
by southpy · 2026-02-03
65.0%
#12358: fix: Sessions format timestamps in sessions_history using userTimezone
by xialonglee · 2026-02-09
64.1%
#4901: Show timezone abbreviation in system prompt
by dpalfox · 2026-01-30
60.9%
#10836: feat(session_status): include ISO-8601 and Unix timestamps for sche...
by jeanlucthumm · 2026-02-07
60.3%
#15914: feat: add messages.suppressMediaPlaceholders config option
by Shuai-DaiDai · 2026-02-14
56.9%
#22478: fix(diagnostics-otel): wire OTLP exporter to emit traffic to config...
by LuffySama-Dev · 2026-02-21
56.4%
#9670: fix: handle numeric string timestamps in cron schedule normalizatio...
by divol89 · 2026-02-05
56.1%