Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Pass date as UTC for graphs

Zach Gollwitzerd1b506d16c80
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,
}));