Skip to content

fix: read naive ClickHouse datetimes as UTC in the console - #831

Merged
catinspace-au merged 1 commit into
mainfrom
fix/appmgmt-epoch-utc
Oct 11, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/appmgmt-epoch-utc

Conversation

@catinspace-au

@catinspace-au catinspace-au commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

clickhouse-connect hands back naive datetimes that are UTC. _epoch called .timestamp() on them, and Python reads a naive value as host local time. So on any host off UTC, every console last-seen and bucket epoch was shifted by the host offset: 39600 s on an AEDT host.

Containers run UTC, so deployed engines were not affected. Local runs and any non-UTC host were wrong.

  • appmgmt/operations.py _epoch: a naive datetime is stamped UTC before .timestamp(); an aware one keeps its own zone.
  • Two tests run under TZ=Australia/Sydney. The naive case FAILS on the old code and passes now. The aware case guards the other branch.

hyperi-ci check: 12087 passed, 7 skipped, 3 xfailed.

Done when console times match the ClickHouse rows on a non-UTC host.

clickhouse-connect returns naive datetimes that are UTC, and _epoch called .timestamp() on them, which reads a naive value as host local time. On a host off UTC every last-seen and bucket epoch the console shows was shifted by the host offset (39600 s on an AEDT host). Containers run UTC, so deployed engines were unaffected; local runs and any non-UTC host were wrong.
@catinspace-au
catinspace-au merged commit bd10855 into main Oct 11, 2026
22 checks passed
@catinspace-au
catinspace-au deleted the fix/appmgmt-epoch-utc branch October 11, 2026 23:46
@github-actions

Copy link
Copy Markdown

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