Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Missing one hour - Daylight Saving Time #86

Open
nathaliaesper opened this issue Jun 18, 2024 · 3 comments
Open

Bug: Missing one hour - Daylight Saving Time #86

nathaliaesper opened this issue Jun 18, 2024 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@nathaliaesper
Copy link

Description

In some cases, it looks like an hour is missing on the x-axis of the plot (if you put your cursor at the 3AM marker, you can see the plot is showing 2AM). I think this might be related to Daylight Saving Time.

Screen Shot 2024-06-18 at 1 51 41 PM

Steps to Reproduce

You can reproduce this bug using the data for the following participants:
NDARGZ387TP5 - night 3
NDARPH834YB1 - night 17
NDARTH459BLU - night 13
NDARUM624FW7 - night 11

Expected Results

This is causing the slider to be off from the x-axis time indicated. You can see where I hovered my mouse over the activity plot, it says 02:01 but should be 03:01. The sleep times that are being stored correspond to the x-axis (not what I indicate with the slider). And so, even if I adjust the slider, when I save this day, close out the app, and then reload it again the slider is shifted way over again to incorrect times.

  1. How the app shows the sleep window after manual adjustments:
    Screen Shot 2024-06-18 at 1 36 49 PM

  2. App results for the same night after closing out the app and reloading the file:
    Screen Shot 2024-06-18 at 1 38 10 PM

Actual Results

The slider and the times from the table should be the same.

Additional Notes

No response

@nathaliaesper nathaliaesper added the bug Something isn't working label Jun 18, 2024
@ReinderVosDeWael
Copy link
Contributor

Woops - this came in while I was on holiday so it fell by the wayside ;D. Will have a look at this soonish.

@ReinderVosDeWael
Copy link
Contributor

The root cause here is that the slider and the graph aren't actually tied to the same axis; the slider is a simple 1-N range, whereas the graph uses actual timepoints for the x-axis. As far as I'm aware Dash provides no way of truly using the same axis for both here.

Each callback that relies on this solves that dichotomy for its own needs, largely relying on the core idea that there's 36 hours in a window and N is known. This assumption breaks, of course, when there's a different number of hours. In some ways the code already works around this problem, and in some was (as demonstrated above) it doesn't.

In theory this isn't actually a terribly complicated issue to resolve, in practice I've found that every fix I try has unintended side-effects due to the interconnected nature of all the callbacks.

All that to say: this may take a while.

@ReinderVosDeWael ReinderVosDeWael changed the title Bug: Missing one hour - Daylight Saving Time [BLOCKED] Bug: Missing one hour - Daylight Saving Time Sep 26, 2024
@ReinderVosDeWael ReinderVosDeWael changed the title [BLOCKED] Bug: Missing one hour - Daylight Saving Time Bug: Missing one hour - Daylight Saving Time Sep 30, 2024
@ReinderVosDeWael ReinderVosDeWael added the wontfix This will not be worked on label Sep 30, 2024
@ReinderVosDeWael
Copy link
Contributor

Marked as won't fix. Instead, a banner is shown notifying the user of the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants