From d1b506d16c80f6aaeb5adc1b1d25b4e27c080615 Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Tue, 19 Nov 2024 16:23:21 -0500 Subject: [PATCH] Pass date as UTC for graphs --- app/javascript/controllers/time_series_chart_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/controllers/time_series_chart_controller.js b/app/javascript/controllers/time_series_chart_controller.js index 93f719fe..626ec745 100644 --- a/app/javascript/controllers/time_series_chart_controller.js +++ b/app/javascript/controllers/time_series_chart_controller.js @@ -51,7 +51,7 @@ export default class extends Controller { _normalizeDataPoints() { this._normalDataPoints = (this.dataValue.values || []).map((d) => ({ ...d, - date: new Date(d.date), + date: new Date(`${d.date}T00:00:00Z`), value: d.value.amount ? +d.value.amount : +d.value, currency: d.value.currency, }));