Skip to content

fix: parse UTC ISO timestamps as UTC on BSD date (macOS)#2

Open
hamiltoon wants to merge 1 commit into
ohugonnot:mainfrom
hamiltoon:fix-macos-utc-iso-parse
Open

fix: parse UTC ISO timestamps as UTC on BSD date (macOS)#2
hamiltoon wants to merge 1 commit into
ohugonnot:mainfrom
hamiltoon:fix-macos-utc-iso-parse

Conversation

@hamiltoon

Copy link
Copy Markdown

iso_to_epoch() stripped the timezone suffix before passing to BSD date -jf, which then interpreted the core as local time. On systems with a non-UTC TZ (e.g. CEST), this produced epochs offset by the local UTC offset, causing 5h-block resets to appear already-passed and SESS_INT to clamp to 0.

Prefix the BSD branch with TZ=UTC so the core is parsed as UTC, matching what the API returns.

iso_to_epoch() stripped the timezone suffix before passing to BSD date -jf,
which then interpreted the core as local time. On systems with a non-UTC
TZ (e.g. CEST), this produced epochs offset by the local UTC offset,
causing 5h-block resets to appear already-passed and SESS_INT to clamp to 0.

Prefix the BSD branch with TZ=UTC so the core is parsed as UTC, matching
what the API returns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant