Time Range Filters Are 1 Hour Behind CST (Asia/Shanghai) #36449
Replies: 1 comment
-
|
This is a known limitation in Superset: time range filters like “Last Week” are always calculated in UTC, not in your server’s local timezone. That’s why you see a 1-hour offset in Asia/Shanghai (UTC+8)—the filters update based on UTC midnight, not local midnight, so the range appears “late” by your local time. There’s currently no built-in way to make these filters follow the server’s timezone or a user’s local timezone in version 4.0.1. The only reliable workaround is to use manual date selection in the filter, rather than relative options like “Last Week” or “Today” source. The “Hours Offset” feature in the Edit Dataset modal can shift timestamps, but it doesn’t fix this for all use cases and doesn’t affect the filter logic itself. There’s an active proposal (SIP-186) and ongoing work to add a user timezone selector, which would allow time range filters to honor the user’s selected timezone and display correct date ranges source. For now, this is a known limitation and area of active development. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My server timezone is CST (Asia/Shanghai).
However, the time range Filters in Superset are always 1 hour behind Chinese local time.
Example
Current time (server):
2025-12-08 07:00 CST (Asia/Shanghai)
When I use a filter such as “Last Week”, Superset generates this range:
2025-11-30 <= Filters field < 2025-12-07
But according to local time, it should already be:
2025-12-01 <= Filters field < 2025-12-08
Superset will not switch to the correct range until 08:00 CST.
So the Filters seem to be calculated using UTC+7 instead of UTC+8, or there is a timezone offset of 1 hour somewhere in the calculation.
Expected Behavior
Time range filters (such as Last Week / Last Day / This Week / Today) should follow the server’s CST timezone (UTC+8) and update ranges correctly at 07:00 CST, not 08:00.
Actual Behavior
Filter ranges update one hour late compared to local CST time.
superset Version: 4.0.1
Beta Was this translation helpful? Give feedback.
All reactions