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 54
54
// Populate date based on URL params or, if absent, the current date
55
55
startDate = urlParams .has (' start_day' ) ? new Date (urlParams .get (' start_day' )) : param .sparkLineTimeFrame .min ;
56
56
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 ));
57
61
}
58
62
$: initDate ($currentDateObject);
59
63
117
121
if (urlParams .has (' as_of' ) && ! isNaN (new Date (urlParams .get (' as_of' )))) {
118
122
asOfMode = ' single' ;
119
123
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 ));
120
126
}
121
127
122
128
let form = null ;
You can’t perform that action at this time.
0 commit comments