From dd740e5d96a1f4c46b4b26faea6530984c57b1fa Mon Sep 17 00:00:00 2001 From: Sterling Archer Date: Thu, 18 Jun 2026 14:28:45 -0700 Subject: [PATCH] Fix timezone bug causing steps to show as 0 --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 6b0ae0f..7e74834 100644 --- a/index.html +++ b/index.html @@ -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') {