From 148417baa118351b5a5f7c22ee43f520553b642d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Legu=C3=A9?= Date: Thu, 26 Mar 2026 23:46:13 -0400 Subject: [PATCH] fix: weather service using UTC instead of locale timezone (#1343) --- services/Weather.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/Weather.qml b/services/Weather.qml index d226365f..b74ae55f 100644 --- a/services/Weather.qml +++ b/services/Weather.qml @@ -128,7 +128,7 @@ Singleton { const forecastList = []; for (let i = 0; i < json.daily.time.length; i++) forecastList.push({ - date: json.daily.time[i], + date: json.daily.time[i].replace(/-/g, "/"), maxTempC: Math.round(json.daily.temperature_2m_max[i]), maxTempF: Math.round(toFahrenheit(json.daily.temperature_2m_max[i])), minTempC: Math.round(json.daily.temperature_2m_min[i]), @@ -141,7 +141,8 @@ Singleton { const hourlyList = []; const now = new Date(); for (let i = 0; i < json.hourly.time.length; i++) { - const time = new Date(json.hourly.time[i]); + const time = new Date(json.hourly.time[i].replace("T", " ")); + if (time < now) continue;