← Back to PRs

#20915: feat: add configurable timezone support for console log timestamps.

by GauravKrv open 2026-02-19 12:39 View on GitHub →
size: S
**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