dForDeveloper / weekly-weather

An app for getting weather forecasts for any US city
https://dfordeveloper.github.io/weekly-weather/
0 stars 0 forks source link

Fix sunrise/sunset bug #20

Open dForDeveloper opened 5 years ago

dForDeveloper commented 5 years ago

Sunrise and sunset times are incorrect for many cities. I think this is because of timezone differences. Also the times on Firefox differ greatly from the times on Chrome.

dForDeveloper commented 5 years ago

I implemented a partial solution with c7554976e83a68f19d9283921d073aca23254800. The differences between actual sunrise and sunset and what the app displays is now within a ~30 minute margin of error. Before it would be off by several hours for some cities. Daylight saving time is still not accounted for, and the discrepancy between Firefox and Chrome remains. However, I think this problem might be caused by the extensions I use in Firefox. For now, the app works best in Chrome.

Dates and times in JavaScript are hard.