amaannawab923 opened a new pull request, #41391: URL: https://github.com/apache/superset/pull/41391
### SUMMARY When a dataset is configured with a non-zero **Hour Offset**, date filters were landing on the wrong calendar day — e.g. filtering for a given date could return the previous day's rows. The root cause is an asymmetry: result timestamps are shifted by `+offset` hours for display (via `normalize_df` / `DateColumn`), but the time-range filter was still comparing against the raw stored values. So the data you saw was offset-adjusted while the filter wasn't, and the two disagreed by the offset. The fix shifts the time-filter bounds by `-offset` hours in `get_time_filter`, so the filter is evaluated in the same offset-adjusted space that's displayed. This covers the dashboard/explore time-range filter path. (The AG Grid column-level date filter builds its own SQL and isn't part of this change — I've left a note to follow that up separately.) ### TESTING INSTRUCTIONS 1. Edit a dataset's **Settings** and set **Hour Offset** to a non-zero value (e.g. `-4`). 2. Build a chart on that dataset with a visible date column and apply a date-range filter. 3. The rows returned should match the selected calendar day after the offset is applied, instead of being shifted by a day. Unit tests added (no offset → raw bounds; positive offset → bounds shifted back; negative offset → bounds shifted forward). Existing time-filter tests still pass. ### ADDITIONAL INFORMATION - [ ] Changes UI This affects any dataset configured with a non-zero hour offset. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
