Timezone for query logs #23
|
I hope I am posting this in the right place as this likely could be me misconfiguring something. In my pihole instances (yay for 0.5.0!!), I see the log entries displayed without mentioning a timezone, but they are shown as my local timezone. When the MCP pulls the logs, it gives the responses in UTC. How would I specify the timezone I want it in or have it explicitly return UTC for my AI agent to convert to my local timezone? Right now, the ambiguity is preventing it from converting it for me, but it seems like pihole is configured for my timezone. I run my piholes as docker containers and they have TZ passed as an environment variable. Is that perhaps something I should include in the MCP's compose file? |
Replies: 1 comment
|
Thanks for the report @Cyclone411 - you weren't misconfiguring anything. The published Docker image ships no timezone database, so the server always rendered times in UTC, and the output never said so. That ambiguity was the bug. Fixed in v0.7.0, just released: Every timestamp now carries an explicit zone marker (eg. 19 Jul 2026, 9:41 AM UTC), so your agent can convert reliably even with zero configuration. |
Thanks for the report @Cyclone411 - you weren't misconfiguring anything. The published Docker image ships no timezone database, so the server always rendered times in UTC, and the output never said so. That ambiguity was the bug.
Fixed in v0.7.0, just released:
Every timestamp now carries an explicit zone marker (eg. 19 Jul 2026, 9:41 AM UTC), so your agent can convert reliably even with zero configuration.
The timezone database is now embedded in the binary, so adding TZ to the MCP's compose service - exactly as you already do for your Pi-holes - renders query logs in your local time. Left unset, output stays UTC and is labelled as such.
Pull ghcr.io/hexamatic/pihole-mcp:latest (or pin :…