PranshulGG / WeatherMaster

A Weather app for android 🌦🌞☔
GNU General Public License v3.0
523 stars 11 forks source link

14 Day Forecast Shows Incorrect Day of Week #36

Closed p134c0d3 closed 1 month ago

p134c0d3 commented 1 month ago

Hello again, I'm on the latest version, updated today.

On the homepage, the 14 day forecast is showing today to be Friday, but it is Saturday here in the US Central Time.

Here is the 14 day forecast: Screenshot_20240914-122159_WeatherMaster.jpg

Here's my calendar showing today as Saturday the 14th: Screenshot_20240914-122826_Proton Calendar.jpg

PranshulGG commented 1 month ago

Is it correct on the forecast page or not?

Illumes commented 1 month ago

I've also noticed this. In the 14 day forecast it shows "Today" and then the day after "today" on the 14 day forecast list is the day you are currently on so today is redundant. What it looks like is that "today" has the current forecast data but the labeled date is behind.

PranshulGG commented 1 month ago

I tried to find the bug, but it's showing the correct dates for every location when I search. If you could provide a screenshot, that would be helpful since I can't find it myself—or maybe it's related to your timezone?

Illumes commented 1 month ago

The screenshot he provided is basically what it is but I don't think it is being described enough. On the screenshot he has it says "today" and the next one is "Saturday." But it is already Saturday according to those photos. When opening the 14d forecast menu it looks like the "today" forecast date is offset and shows it as one date before yet the weather on it is accurate. Screenshot_20240917-001211 markup_1000000408 markup_1000000407

PranshulGG commented 1 month ago

Oh, now I get it. Maybe it's pulling the wrong timezone and showing the past forecast instead of the next one due to the difference between the timezone and the current time.

PranshulGG commented 1 month ago

Update: I literally tried everything, and it seems to be working fine 😣. I can't get it to show the wrong dates. Are the dates always showing incorrectly for you, or do they get fixed later in the day?

Illumes commented 1 month ago

Yeah I think it might be a time zone issue. I looked over it at like 8 pm my time (ET) and I believe it switched over to the correct date.

PranshulGG commented 1 month ago

Yeah I think it might be a time zone issue. I looked over it at like 8 pm my time (ET) and I believe it switched over to the correct date.

Well, if that's the case, it's probably an issue with the API, but I'll still see if there's anything I can do to fix it anyway.

Christmaswreath commented 1 month ago

+1 This seems to be related to system locale since whenever I switch locations in the app the same stuff appears. Also, it's important to note that the 14th day in the forecast says "NaN°" meaning it probably has something to do with the API. Also, is there a background for when it's raining or sunny in the app? I dislike how dark it is.

PranshulGG commented 1 month ago

@Christmaswreath Can you specify where it's showing NaN° and what background animation you're talking about?

Christmaswreath commented 1 month ago

@Christmaswreath Can you specify where it's showing NaN° and what background animation you're talking about?

The problem seems to have fixed itself. I will try to keep you updated.

Christmaswreath commented 1 month ago

https://github.com/user-attachments/assets/8ad83a9a-9d15-4a90-bdf0-750e50b7fa35

Here is the recording. I clicked where the temperature display was showing NaN°. Also, to further help, on the 14 day forecast section the "more" button doesn't work.

PranshulGG commented 1 month ago

'More' isn't a button. Click on a forecast item—it’s just there to show that it’s clickable. I didn’t see any NaN in the recording, so it would be helpful if you could attach a screenshot. Maybe it fixed itself.

Christmaswreath commented 1 month ago

The ">" in an app usually indicates a button. I was able to capture the error as a screen recording now. Maybe try setting your time zone to CST to recreate it? The video

PranshulGG commented 1 month ago

~It's really hard; even after switching the timezone to CST, I can't recreate it.~

~Edit: One thing I noticed is that the date doesn't change before sunrise. Maybe that's the issue; if you are checking the weather before sunrise, it will still show the previous day's date.~

Edit: nvm i fixed it.

sarojpanda44 commented 1 month ago

I'm seeing correct days in forecast. Today is Thursday and next is shown Friday

PranshulGG commented 1 month ago

I'm seeing correct days in forecast. Today is Thursday and next is shown Friday

This issue seems to be only with the time zones in America, I guess.