fix: inherit explore default timezone in chat charts without time_zone - #9839
fix: inherit explore default timezone in chat charts without time_zone#9839eminemead wants to merge 1 commit into
time_zone#9839Conversation
Explain charts omit time_zone and were binned in UTC. Resolve the same explore default as dashboards, keeping an explicit spec zone authoritative and falling back to UTC when no explore is available.
|
1. The On this branch, These pass on The layering here is deliberate: export function resolveChartTimeZone(explicitTimeZone, explore) {
if (explicitTimeZone) return explicitTimeZone;
if (!explore) return getUTCIANA();
return getDefaultTimeZone({
...explore,
timeZones: explore.defaultPreset?.timezone
? [explore.defaultPreset.timezone, ...(explore.timeZones ?? [])]
: explore.timeZones,
});
}(or simply read 2. The explore that supplies the timezone is chosen arbitrarily, and the selection is duplicated.
3. The chart is blank while the explores query is in flight.
4. Minor: the UTC branch in
|
time_zonewere always binned in UTC, so day grains did not match the explore default timezone.ChartBlocknow resolves timezone the same way dashboards do: explicit spectime_zone, else the exploredefaultPreset.timezone/ firsttimeZonesentry, else UTC.getDefaultTimeZonehonorsdefaultPreset.timezonefirst. An explicit spec zone stays authoritative.Checklist:
Developed in collaboration with Claude Code