Fix timezone bug causing steps to show as 0

This commit is contained in:
Sterling Archer
2026-06-18 14:28:45 -07:00
parent faac0d529a
commit dd740e5d96
+2 -1
View File
@@ -1607,7 +1607,8 @@ function getStepsForPeriod(stepsByDate, period) {
const keys = Object.keys(stepsByDate || {});
let total = 0;
for (const k of keys) {
const d = new Date(k);
const parts = k.split('-');
const d = new Date(parseInt(parts[0]), parseInt(parts[1]) - 1, parseInt(parts[2]));
if (period === 'day') {
if (isSameDay(d, today)) total += stepsByDate[k];
} else if (period === 'week') {