-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Description
Bug description
Describe the bug
When working with datetime columns in a Bar Chart (and potentially other chart types) in the latest master branch of Apache Superset, switching between different datetime display formats results in an incorrect Unix timestamp conversion, leading to a significant time discrepancy.
To Reproduce
Create a Bar Chart in Superset using a dataset containing a datetime column (e.g., 2026-02-15 16:30:00).
In the chart's configuration panel, switch the datetime display format between the available options.
Observe the resulting Unix timestamp value displayed after the format switch.
Expected behavior
The converted Unix timestamp should accurately represent the original datetime value. For the example 2026-02-15 16:30:00, the correct timestamp (in milliseconds) is 1771144200000.
Actual behavior
When switching formats, the resulting timestamp is 1771173000000. When converted back to a datetime, this corresponds to 2026-02-16 00:30:00, which is 8 hours later than the original datetime 2026-02-15 16:30:00. This indicates a critical error in the timezone handling or conversion logic when switching display formats.
Screenshots
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.