getify / demo-app-weatheround Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I did significant work to fix some DST bugs related to forecast data (daily -- sunrise/sunset, as well as hourly). The root of the problem is the weather API doesn't return forecast data with DST awareness. The API server itself switches to DST whenever according to its physical/logical location, but doesn't respect the DST status of any locations it's providing future forecast data for. This causes various off-by-one-hours.
Though most of the bugs were fixed, unfortunately, some DST bugs still remain. I think they're related to the specific DST-change day, not the subsequent days.
In particular, it seems like if you have selected the config to display/format times in your own timezone (instead of remote timezone), AND you look at a location in a different timezone from your own, AND it's the DST-change day... the logic currently used for fixing the hour timezone labels is bad. THAT logic is here:
demo-app-weatheround/web/src/hooks/useGetWeather.js
Lines 562 to 696 in 887b8f1
That logic makes the assumption for DST-change days that it needs to slide the hourly labels by 1 (upward or downward). But the amount it needs to slide (and pull from the previous or next days) is likely not 1
but needs to include the delta between your local timezone offset and the target timezone offset.
Likely to be very tricky logic here. Ugh.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.