fix hour on flame theme

This commit is contained in:
Help-14 2022-05-06 09:12:32 +07:00 committed by GitHub
parent f64b69ced4
commit 137eb1cd91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,8 @@
if (!weather) return;
// Parse weather id
let icon = null;
let isDay = Date.now().hour >= 6 && Date.now().hour < 18;
let hour = new Date().getHours();
let isDay = hour >= 6 && hour < 18;
const weatherCode = weather.weather[0].id;
if ([200, 201, 202, 210, 211, 212, 221, 230, 231, 232].includes(weatherCode)) {
icon = Skycons.RAIN; //Thunderstorm