From 57965daebe189bd85a02600996c542b215df6f57 Mon Sep 17 00:00:00 2001 From: Ben West Date: Sun, 15 Jan 2023 09:59:44 -0800 Subject: [PATCH] pin start of day in profile's timezone This more closely mirrors logic in loopalyzer, as well as the intent from the surrounding code in reportclient.js. --- lib/report_plugins/daytoday.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/report_plugins/daytoday.js b/lib/report_plugins/daytoday.js index c4518b21fc7..1bcaeea46a0 100644 --- a/lib/report_plugins/daytoday.js +++ b/lib/report_plugins/daytoday.js @@ -432,8 +432,8 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio contextCircles.exit() .remove(); - var from = moment.tz(day, profile.getTimezone( )); - var to = moment(from).add(1, 'days'); + var from = moment.tz(day, profile.getTimezone( )).startOf('day'); + var to = moment(from.clone( )).add(1, 'days'); var iobpolyline = '' , cobpolyline = '';