Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.19](https://github.com/cube-js/cube/compare/v1.7.18...v1.7.19) (2026-08-12)

### Bug Fixes

- **cubesql:** Resolve data source for synthetic-only queries ([#11526](https://github.com/cube-js/cube/issues/11526)) ([b1c87dc](https://github.com/cube-js/cube/commit/b1c87dc40f9c7183d7eb6a5c0e08682092aac077))
- **schema-compiler:** promote DATE columns in Trino/Presto convertTz ([#11516](https://github.com/cube-js/cube/issues/11516)) ([bb0d57a](https://github.com/cube-js/cube/commit/bb0d57aae1cfd4495e8d814fb6bfe737053ce4eb))
- **tesseract:** report multi-stage reads of out-of-grain dimensions ([#11514](https://github.com/cube-js/cube/issues/11514)) ([e090594](https://github.com/cube-js/cube/commit/e0905948546b4bccf8f95295d8e7c1898e7f9f56))
- **tesseract:** Resolve join for hint-less member expressions on views ([#11501](https://github.com/cube-js/cube/issues/11501)) ([9715bf1](https://github.com/cube-js/cube/commit/9715bf189db8b1e725db5bc7c3241e5e793be1fe))

### Features

- **cubesql:** Support `regtype` and `regtype[]` casts ([#11503](https://github.com/cube-js/cube/issues/11503)) ([c12a106](https://github.com/cube-js/cube/commit/c12a1065208e4308f15855b981ce85ae9be6acc2))
- **cubesql:** Support `WIDTH_BUCKET` SQL pushdown ([#11500](https://github.com/cube-js/cube/issues/11500)) ([b951c00](https://github.com/cube-js/cube/commit/b951c004038acf4e7640867bf3702d3144ad80a9))
- **tesseract:** push a segment named in FILTER_PARAMS into the cube's sql ([#11517](https://github.com/cube-js/cube/issues/11517)) ([a0723ac](https://github.com/cube-js/cube/commit/a0723ace6ff2d76404b219ffa72df8cfada6cc13))

## [1.7.18](https://github.com/cube-js/cube/compare/v1.7.17...v1.7.18) (2026-08-09)

### Features
Expand Down
140 changes: 140 additions & 0 deletions docs-mintlify/admin/time-zones.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: Time zones
description: Run queries in the time zone your readers actually work in — account-wide, per user, and per dashboard.
---

By default, every query Cube runs buckets time in the deployment's
[default time zone](/docs/data-modeling/configuration#default-time-zone) — the
[`CUBEJS_DEFAULT_TIMEZONE`](/reference/configuration/environment-variables#cubejs_default_timezone)
environment variable, `UTC` unless you change it. That means "orders today" answers the
same question for everyone, regardless of where they sit — which is wrong by up to a day
for anyone outside that zone.

Turning on **user time zones** lets a zone be resolved per account, per user, and per
dashboard instead.

<Warning>

This feature is **off by default**, and turning it on **moves numbers**. While it is
off, nothing changes for anyone. Once it is on, a reader whose effective zone differs
from that default sees different daily, weekly, and monthly totals — because the days
are cut in a different place.

</Warning>

## What a time zone changes

The effective zone is applied to every query Cube runs on your behalf:

- **Time dimension bucketing** — which rows fall into which day, week, month, or quarter.
- **Relative dates** — `today`, `yesterday`, `this week`, `last 7 days`, and the dates
the agent resolves when you ask about "today".
- **Date range filters** — the boundaries you type are interpreted in the effective zone.

It applies to charts, dashboards, drill-downs, subtotals and totals, sparklines, period
comparison, [Analytics Chat](/docs/explore-analyze/analytics-chat), and embedded
surfaces alike, so a dashboard's charts and its agent panel always agree.

A time zone is a **display and bucketing** concern only. It never affects what data a
user can see — access control still comes from roles and the security context.

## Turn it on

Go to **Admin → Settings → Time Zones**. Three controls, in the order the decisions are
made:

| Control | What it does |
| --- | --- |
| **Enable user time zones** | The master switch. Off by default; while off, no surface resolves a zone at all. |
| **Tenant time zone** | The account-wide zone: everyone gets it unless they override it. Leave it as **Deployment default** to keep using each deployment's own default. |
| **Allow personal time zones** | Whether users may choose their own zone on their Preferences page. On by default once the feature is enabled. |

The last two appear only while the feature is enabled, and they apply to every user in
the account. The UI labels the middle control **Tenant time zone**; this page calls the
zone it sets the *account-wide zone*, matching how the docs scope things.

{/* TODO: screenshot — Admin → Settings → Time Zones card with the three controls */}

## Personal time zone

When **Allow personal time zones** is on, each user can pick their own zone under
**Preferences → Time zone** (see [Preferences](/docs/preferences#time-zone)). Only a zone
the user has explicitly chosen is ever applied — Cube never silently uses the browser's
zone, though it will offer the detected zone as a suggestion.

Turning **Allow personal time zones** off makes everyone query in the account-wide zone again,
and existing personal choices stop applying.

## Dashboard time zone

A dashboard is one artifact many people read, so its zone is a property of the dashboard
rather than of whoever opens it. Set it in the dashboard builder under
**Options → Time zone**, which offers three choices:

| Choice | Behavior |
| --- | --- |
| **Deployment default** | Inherit — follow the account-wide zone, or the deployment's own default when no account-wide zone is set. |
| **Viewer time zone** | Resolve per reader, so each viewer sees their own local day. Use this for an operational board. |
| A named zone | Pin the dashboard — "this dashboard reports in `America/New_York`", and keeps doing so after an admin changes the account-wide zone. |

The zone is stored with the **published** version, so editing a draft does not move the
numbers on the dashboard people are currently reading. Publish to apply it.

**Viewer time zone** is offered only while **Allow personal time zones** is on — without
it, a per-reader promise is one Cube would not keep.

### Reading a dashboard in another zone

A published dashboard shows the zone its numbers are bucketed in, next to its title,
along with where that zone came from — **Set by this dashboard**, **Your own time zone**,
or **Deployment default**.

Where the dashboard leaves the choice open, that control is also a dropdown: pick another
zone to look at the same dashboard in it. This is a temporary lens, not an edit — nothing
is saved, nobody else is affected, and leaving the dashboard drops it.

The zone is shown but **not changeable** when the dashboard is pinned to a named zone, or
when the account does not allow personal time zones. In both cases the zone is not the
reader's to reinterpret.

## Exploration time zone

A saved exploration carries a zone the same way, chosen from the **Time zone** control in
the Explore header. The rows mean what they mean on a dashboard: inherit, resolve per
viewer, or pin a named zone. It saves as soon as you pick it, so anyone who opens the
exploration afterwards gets that zone; readers with view-only access see the zone but
cannot change it.

## How the zone is resolved

Highest priority first.

**A dashboard or a saved exploration:**

1. A reader's temporary lens, or an embed host's `?timezone=` (see
[embedded time zones](/embedding/iframe/time-zones)).
2. The artifact's own pinned zone.
3. The reader's personal zone — only when the artifact is set to **Viewer time zone**,
and only when the account allows personal zones.
4. What the artifact inherits: the account-wide embed zone for an embed, otherwise the
account-wide zone.
5. The deployment's default time zone.

**Ad-hoc surfaces** — a new exploration, a standalone chat — resolve the reader's own
personal zone first, then the account-wide zone. Here the only reader is the person asking, so
their own zone is the right answer.

**Embedded surfaces** follow their own chain, documented in
[embedded time zones](/embedding/iframe/time-zones).

At every level, if nothing resolves, Cube sends no zone and the deployment applies its
default time zone — exactly as it did before this feature existed.

## Valid time zone values

Cube accepts [IANA time zone names][link-tzdb] such as `America/New_York` or
`Asia/Tokyo`. Bare UTC offsets like `+05:30` are **rejected** rather than accepted,
because Cube would compute them in UTC while reporting the offset back — silently wrong.
Legacy aliases are understood (`US/Eastern` resolves to `America/New_York`).

[link-tzdb]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2 changes: 2 additions & 0 deletions docs-mintlify/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@
"admin/customization/dashboard-themes"
]
},
"admin/time-zones",
"admin/account-billing/ai-tokens",
"admin/account-billing/api-keys",
"admin/account-billing/billing-faq",
Expand All @@ -435,6 +436,7 @@
"embedding/iframe/creator-mode",
"embedding/iframe/customization",
"embedding/iframe/localization",
"embedding/iframe/time-zones",
"embedding/iframe/events",
{
"group": "Authentication",
Expand Down
21 changes: 21 additions & 0 deletions docs-mintlify/docs/preferences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ account, apply across all devices, and don't affect other users in the account.
| --- | --- | --- |
| Theme | Choose between System, Light, or Dark visual theme | System |
| Language | Choose the language for the Cube interface | English (US) |
| Time zone | Run your queries in this time zone, so dates like "today" match your local day | Deployment default |
| Sidebar drawer | Show only icons and expand the sidebar on hover | Off |
| Pointer cursors | Use pointer cursors on interactive elements | On |
| Code editor | Switch to the new CodeMirror-based code editor for data models | Off |
Expand Down Expand Up @@ -49,3 +50,23 @@ To set the language of **embedded** Cube surfaces (dashboards, Analytics Chat, a
Creator Mode) instead, see [embedding localization](/embedding/iframe/localization).

</Info>

## Time zone

By default your queries run in the deployment's
[default time zone](/docs/data-modeling/configuration#default-time-zone). If your admin has
enabled **user time zones** and left personal time zones allowed, you can pick your own
under **Time zone** on the **Preferences** page — so time dimensions bucket into your
local day and `today` means your today.

Only a zone you pick is applied; Cube never silently switches you to your browser's zone.
If your device is somewhere else, Cube offers the detected zone as a dismissible
suggestion rather than applying it.

Leaving it as **Deployment default** follows the account-wide zone your admin set, or the
deployment's default time zone when there isn't one. The control is hidden when your admin
has not enabled the feature, or has turned off personal time zones — in that case
everyone queries in the account-wide zone.

See [Time zones](/admin/time-zones) for what a zone changes and how dashboards carry their
own.
15 changes: 15 additions & 0 deletions docs-mintlify/embedding/iframe/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ sendAction("cube:action:refresh");
| [`cube:action:set-color-scheme`](#cube-action-set-color-scheme) | Switch light / dark / auto | `{ scheme }` |
| [`cube:action:set-theme`](#cube-action-set-theme) | Apply a brand theme (colors, fonts) | `embedTheme` object |
| [`cube:action:set-locale`](#cube-action-set-locale) | Switch the UI language | `{ locale }` |
| [`cube:action:set-timezone`](#cube-action-set-timezone) | Switch the query time zone | `{ timezone }` |
| [`cube:action:set-filter`](#cube-action-set-filter) | Push a filter into a dashboard | `{ filterUrlParameter }` |
| [`cube:action:navigate`](#cube-action-navigate) | Navigate the embed to a path | `{ path }` |
| [`cube:action:refresh`](#cube-action-refresh) | Re-run the embed's queries | _none_ |
Expand Down Expand Up @@ -359,6 +360,20 @@ for the list of supported languages and the other ways to set the language.
sendAction("cube:action:set-locale", { locale: "es" });
```

#### `cube:action:set-timezone` {#cube-action-set-timezone}

Switch the time zone the embed's queries run in — which day a row falls into, and what
`today` means. Takes precedence over the `?timezone=` URL parameter and the account
default. See [Time zones](/embedding/iframe/time-zones) for the other ways to set it.

| Field | Type | Description |
| --- | --- | --- |
| `timezone` | `string` | An [IANA time zone name](/admin/time-zones#valid-time-zone-values), e.g. `Asia/Tokyo`. Bare UTC offsets are ignored. |

```js
sendAction("cube:action:set-timezone", { timezone: "Asia/Tokyo" });
```

#### `cube:action:set-filter` {#cube-action-set-filter}

Push a filter into a dashboard. The `filterUrlParameter` is the same
Expand Down
97 changes: 97 additions & 0 deletions docs-mintlify/embedding/iframe/time-zones.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Time zones
description: Set the time zone for embedded Cube surfaces — account-wide, per embed via URL, or at runtime.
---

Embedded Cube surfaces — dashboards, [Analytics Chat](/embedding/iframe/analytics-chat),
and the full app in [Creator Mode](/embedding/iframe/creator-mode) — bucket time in a
zone you control. You can set a default for the whole account, override it per embed with
a URL parameter, or switch it at runtime from the host page.

This matters most when your end users are not in your deployment's zone: without it,
"today" in an embedded dashboard means today in the deployment's
[default time zone](/docs/data-modeling/configuration#default-time-zone), not in your
customer's.

<Note>

Available on [Premium and above plans](https://cube.dev/pricing).

</Note>

<Info>
Embedded time zones require **user time zones** to be enabled for the account. See
[Time zones](/admin/time-zones) for the account-wide policy, what a zone changes, and
the console-side behavior.
</Info>

## How the zone is resolved

The time zone of an embedded surface is resolved from the following sources, highest
priority first:

1. **Runtime override** — a [`cube:action:set-timezone`](/embedding/iframe/events#cube-action-set-timezone)
message sent from the host page (see [At runtime](#at-runtime)).
2. **URL parameter** — the `?timezone=` query parameter on the embed URL (see
[Per embed via URL](#per-embed-via-url)).
3. **Dashboard's own zone** — a dashboard pinned to a named zone, or set to resolve per
viewer (see [dashboard time zone](/admin/time-zones#dashboard-time-zone)). In
[signed embedding](/embedding/iframe/auth/signed) the viewer has no Cube account and
therefore no personal zone, so a viewer-resolved dashboard falls through to the next
step — supply `?timezone=` if you want each end user's own zone.
4. **Account default** — the zone configured in **Embed → Settings** (see
[Account-wide default](#account-wide-default)).
5. **Account-wide zone**, then the deployment's default time zone.

A host override outranks a dashboard's pinned zone by design: the integrator is speaking
for the whole frame, and you know your user's zone better than the dashboard's author
does.

<Note>
If the account policy is disabled, none of this applies — Cube sends no zone and the
deployment's default time zone is used, exactly as before.
</Note>

## Account-wide default

Set a default time zone for all embedded surfaces:

1. Go to **Embed → Settings**.
2. In the **Time Zone** card, pick a zone from the dropdown.

The selected zone applies to every embedded surface across the account, unless a specific
embed overrides it. Re-selecting the account-wide zone clears the embed-specific value, so
embeds follow the account-wide zone again.

The picker is inert while user time zones are off for the account — a zone stored there
would be one nothing applies.

## Per embed via URL

Override the account default for an individual embed by adding the `?timezone=` query
parameter to the embed URL:

```text
https://your-tenant.cubecloud.dev/embed/dashboard/YOUR_DASHBOARD_PUBLIC_ID?session=YOUR_SESSION_ID&timezone=America/New_York
```

The parameter is read once when the embed loads and pinned for the session, so in-app
navigation won't drop it.

Values must be [IANA time zone names](/admin/time-zones#valid-time-zone-values). An
unusable value — including a bare UTC offset like `+05:30` — is ignored, and the embed
falls back to the account default rather than quietly shifting every number.

## At runtime

Switch the zone after the embed has loaded by sending a
[`cube:action:set-timezone`](/embedding/iframe/events#cube-action-set-timezone) message
from the host page. This takes precedence over both the URL parameter and the account
default — use it when your own user changes their zone:

```js
sendAction("cube:action:set-timezone", { timezone: "Asia/Tokyo" });
```

See [Events and actions](/embedding/iframe/events) for the full host ↔ embed messaging
contract.
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,10 @@ The default [time zone][ref-time-zone] for queries.
You can set the time zone name in the [TZ Database Name][link-tzdb] format, e.g.,
`America/Los_Angeles`.

This is the fallback. When [user time zones](/admin/time-zones) are enabled for the
account, a resolved account, personal, dashboard, or embed zone is sent with the query and
takes precedence over this value.

## `CUBEJS_DEFAULT_API_SCOPES`

[API scopes][ref-rest-scopes] used to allow or disallow access to REST (JSON) API
Expand Down
4 changes: 4 additions & 0 deletions docs-mintlify/reference/core-data-apis/queries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ time zone conversion to dimensions that are not used as time dimensions in a que
Additionally, note that time zones have impact on [pre-aggregation
matching][ref-matching-preaggs-time-dimensions].

In the Cube cloud platform, queries run from the interface, dashboards, and Analytics Chat
can resolve a time zone per account, per user, or per dashboard — see
[Time zones](/admin/time-zones).

## Query types

Most commonly, you will run [regular queries](#regular-query). See the table
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.18",
"version": "1.7.19",
"npmClient": "yarn",
"command": {
"bootstrap": {
Expand Down
4 changes: 4 additions & 0 deletions packages/cubejs-api-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.19](https://github.com/cube-js/cube/compare/v1.7.18...v1.7.19) (2026-08-12)

**Note:** Version bump only for package @cubejs-backend/api-gateway

## [1.7.18](https://github.com/cube-js/cube/compare/v1.7.17...v1.7.18) (2026-08-09)

**Note:** Version bump only for package @cubejs-backend/api-gateway
Expand Down
Loading
Loading