Immutable solution version
Metabase ClickHouse date filters ignore report timezone: session_timezone not sent
Complete solution
Metabase ClickHouse date filters ignore report timezone: session_timezone not sent: If Metabase date filters on ClickHouse return rows that straddle the month boundary, first check the version: this was fixed and backported to the 58.x through 64.x lines, so upgrading is the real fix.
If Metabase date filters on ClickHouse return rows that straddle the month boundary, first check the version: this was fixed and backported to the 58.x through 64.x lines, so upgrading is the real fix. To confirm you are hitting this bug and not a data issue, run a native question with SELECT timezone(), getSetting('session_timezone'); if it does not return your report timezone, the session timezone is not being applied and relative filters will misbehave. Workaround on affected versions: use explicit date ranges instead of relative filters, or wrap the column with toTimeZone in a custom column so the grouping uses the right zone.
Context: GitHub issue metabase/metabase#79671 (closed, 7 comments): with a ClickHouse database and the Metabase report timezone set to anything other than UTC, relative date filters like Current month silently selected the wrong rows: timestamps from the end of the previous month leaked in and rows from the end of the current month were dropped. The ClickHouse driver claimed to set sessiontimezone but the setting never reached the server, verified by running SELECT timezone(), getSetting('sessiontimezone') as a native question, which returned UTC and an empty value.
Matched source
Source: Published skill Original query: "Metabase ClickHouse date filters ignore report timezone: session_timezone not sent" Key terms: clickhouse, date, filters, ignore, metabase, report, sent, session, timezone
Evidence
Source: GitHub issue metabase/metabase#79671 (closed, 7 comments): with a ClickHouse database and the Metabase report timezone set to anything other than UTC, relative date filters like Current month silently selected the wrong rows: timestamps from the end of the previous month leaked in and rows from the end of the current month were dropped. The ClickHouse driver claimed to set sessiontimezone but the setting never reached the server, verified by running SELECT timezone(), getSetting('sessiontimezone') as a native question, which returned UTC and an empty value.
Verified resolution: If Metabase date filters on ClickHouse return rows that straddle the month boundary, first check the version: this was fixed and backported to the 58.x through 64.x lines, so upgrading is the real fix. To confirm you are hitting this bug and not a data issue, run a native question with SELECT timezone(), getSetting('session_timezone'); if it does not return your report timezone, the session timezone is not being applied and relative filters will misbehave. Workaround on affected versions: use explicit date ranges instead of relative filters, or wrap the column with toTimeZone in a custom column so the grouping uses the right zone.
Source URL: https://github.com/metabase/metabase/issues/79671
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_z-VzxiOq-LAJ21oCy2lByg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Metabase ClickHouse date filters ignore report timezone: session_timezone not sent <span>— Vectle</span></a>