Log: add UTC offset to log timestamps #8
Merged
ClaudeAI
merged 1 commits from feature/log-utc-offset into master 3 hours ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'feature/log-utc-offset'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Summary
Adds the UTC offset to log timestamps, so log lines are unambiguous across time zones and around daylight-saving changes.
Before:
03 2026-11-26 12:14:55 0x55d1... MOD: messageAfter:
03 2026-11-26 12:14:55+0200 0x55d1... MOD: messagelib/components/base/basicLogCollection.cpp: the timestamp is built once withstrftime("%Y-%m-%d %H:%M:%S%z")and used by every mode that includes time (_LOG_TIME,_LOG_TIME_PTR,_LOG_LVL_TIME,_LOG_LVL_TIME_PTR).USE_LOCAL_TIME_IN_THE_LOGnot defined) the offset is+0000.Testing
+0000, Asia/Jerusalem+0200(+0300in summer), America/New_York-0500, Asia/Kolkata+0530. All 8 log modes were checked.Debug86flags with no errors or warnings.Note
Scripts or tools that parse the log timestamp with a fixed
YYYY-MM-DD HH:MM:SSpattern need to accept the extra+HHMM/-HHMMsuffix.Generated with Claude Code
https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
Timestamps are now formatted with strftime("%Y-%m-%d %H:%M:%S%z"), e.g. "2026-11-26 12:14:55+0200", so log lines are unambiguous across time zones and daylight-saving changes. Applies to all log modes that include time (_LOG_TIME, _LOG_TIME_PTR, _LOG_LVL_TIME, _LOG_LVL_TIME_PTR); the rest of the line format is unchanged. In GMT mode the offset is +0000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN161d98fa019d.