File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 5454 // Populate date based on URL params or, if absent, the current date
5555 startDate = urlParams .has (' start_day' ) ? new Date (urlParams .get (' start_day' )) : param .sparkLineTimeFrame .min ;
5656 endDate = urlParams .has (' end_day' ) ? new Date (urlParams .get (' end_day' )) : param .sparkLineTimeFrame .max ;
57+
58+ // Also normalize the dates to the current timezone
59+ startDate = new Date (startDate .getTime () + Math .abs (startDate .getTimezoneOffset () * 60000 ));
60+ endDate = new Date (endDate .getTime () + Math .abs (endDate .getTimezoneOffset () * 60000 ));
5761 }
5862 $: initDate ($currentDateObject);
5963
117121 if (urlParams .has (' as_of' ) && ! isNaN (new Date (urlParams .get (' as_of' )))) {
118122 asOfMode = ' single' ;
119123 asOfDate = new Date (urlParams .get (' as_of' ));
124+ // Also normalize the dates to the current timezone
125+ asOfDate = new Date (asOfDate .getTime () + Math .abs (asOfDate .getTimezoneOffset () * 60000 ));
120126 }
121127
122128 let form = null ;
You can’t perform that action at this time.
0 commit comments