rusackas opened a new pull request, #34564:
URL: https://github.com/apache/superset/pull/34564

   ### SUMMARY
   This PR fixes a bug in the Calendar Heatmap visualization where dates were 
displayed one day off. The issue was caused by incorrect timezone offset 
adjustment in the frontend code. The timestamps from the backend are already in 
UTC and should be displayed without local timezone conversion.
   
   Fixes #28931
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **Before:** Date showing as 2024-05-30 when it should be 2024-05-31
   **After:** Date correctly displays as 2024-05-31
   
   ### TESTING INSTRUCTIONS
   1. Create a Calendar Heatmap visualization with data containing specific 
dates
   2. Verify that the dates displayed match the source data without any day 
offset
   3. Test with dates near midnight to ensure no shifting occurs
   4. Run the updated test suite: `npm run test -- 
plugins/legacy-plugin-chart-calendar/test/getFormattedUTCTime.test.ts`
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #28931
   - [ ] Required feature flags:
   - [x] Changes UI (fixes date display in Calendar Heatmap)
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ## Changes Made
   - Removed unnecessary timezone offset calculation in `getFormattedUTCTime` 
function
   - Added comprehensive tests to verify dates display correctly at various 
times
   - Tested with edge cases including dates near midnight
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to