nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.36k stars 71.35k forks source link

Time Change, Date and Treatment Discrepancy #8176

Open marionbarker opened 7 months ago

marionbarker commented 7 months ago

Describe the bug I am noting discrepancies in date vs some treatments (and thus plots) before and during the recent time change. I believe it is basal and events that don't align as expected.

Comment I'm happy to close this issue and add to an existing issue if that is preferred - just let me know which issue number. I believe this is related to a long-standing problem when the computer time is not aligned with the profile time. I believe this was partially fixed with release 15.0.

Configuration

Details and Graphics The graphics are way zoomed out to show multiple days, so are poor resolution - just look at the overview. I describe the steps to generate each graph and then follow up with composite graphics to emphasize the discrepancy.

For all reports, I started fresh (close report, open report and configure) so that prior fetches from the database are cleared.

For the US, the time change was at 2 am on Nov 5, 2023 (11/5/2023 using US notation.)

First test, all days are before time change:

Second test, select days that span the time change:

Third test, select days after the time change:

First composite graphic - plots on left and right are for same date from different selections for date range for Day to Day plots.

range-across-daylight-savings

Next comment covers using an Event Filter.

marionbarker commented 7 months ago

Continuing the bug report in a new comment. (Edited to fix date error. CGM sensor started 10/28 not 10/29 as originally stated. Easy to get confused when reported dates do not align.)

Fourth test, search by Event Type vs Select known day:

These days have a CGM Sensor Start in the Treatments:

Search using Event Type: CGM Sensor Start:

Start a new report (clears data already loaded)

Start a new report (clears data already loaded)

I had the date wrong when I did these tests - what shows up on 10/29 for sensor start actually happened 10/28

  • Select date range of 10/29/2023 to 10/29/2023 without adding event type
  • First submit shows plots for 10/28 and 10/29
  • only first day (10/28) shows basal plot and "default" at midnight
  • 10/29 shows no basal plot and "default" at 23:00
  • Second submit shows same plot as first submit but only for 10/29
  • include first submit plot as right side of composite in graphic below

Composite graphic:

event-select-and-range

stucka commented 5 months ago

Possibly related: I have an instance of 15.0.2 at nightscoutpro dot com, which I believe may be on UK time. So it's the night of Monday, January 29, here, and early Tuesday, January 30, there.

Reports: Daily Stats: Show reports entries for Tuesday, January 29, and Monday, January 28.

I can work around the timezone difference but there's a basic discrepancy those dates in the different formats.

rpm5099 commented 3 months ago

I am noticing that when I enter treatments in nightscout using the + that after 8pm EST is always defaults to the next day, and if you don't manually change it then it will enter it 24 hours in the future. I think that issue is related, probably the same cause, but I have not had a chance to track it down yet.