Closed geosaaga closed 2 months ago
14:00 local time was used before the change. There was also other issue
The code
const index = dayArray.findIndex((d) => { const dateObj = new Date(d.epochtime * 1000); const hours = dateObj.getHours(); return hours === 14; });
used device local time and didn't work for foreign locations. Removed code, because it returned random indexes for foreign locations. The zero index is returned instead, because it is closest to 15:00 if that time is passed already.
14:00 local time was used before the change. There was also other issue
The code
used device local time and didn't work for foreign locations. Removed code, because it returned random indexes for foreign locations. The zero index is returned instead, because it is closest to 15:00 if that time is passed already.