amaannawab923 commented on code in PR #36270:
URL: https://github.com/apache/superset/pull/36270#discussion_r2667775248
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/dateFilterComparator.ts:
##########
@@ -17,25 +17,50 @@
* under the License.
*/
+/**
+ * Timezone-safe date comparator for AG Grid date filters.
+ *
+ * This comparator normalizes both dates to UTC midnight before comparison,
+ * fixing the off-by-one day bug that occurs when:
+ * - User's timezone differs from UTC
+ * - Data is stored in UTC but filtered in local time
+ * - Midnight boundary crossing due to timezone offset
+ *
+ * Bug references:
+ * - AG Grid Issue #8611: UTC Date Editor Problem
+ * - AG Grid Issue #3921: DateFilter timezone regression
Review Comment:
These are indeed AG Grid issues, not Superset issues. The comment says "AG
Grid Issue" and both references exist on the ag-grid/ag-grid repository:
1.https://github.com/ag-grid/ag-grid/issues/8611 - UTC Date Editor Problem
(discusses how the date editor converts UTC dates to local timezone)
2. https://github.com/ag-grid/ag-grid/issues/3921 - DateFilter timezone
regression (discusses timezone info being serialized unexpectedly)
Both issues are directly relevant to the timezone handling problem this
comparator addresses
@msyavuz
--
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]