Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix download charts after a DST transition
When falling back, a bug in date-fns[^0] results in the 23 hour day being skipped when building the `dates` array in `toChartData` if the current time is between 00:00 and 01:00 UTC. This results in that day's data essentially going missing, resulting in the subtly broken charts noted in rust-lang#5477. This commit adds a workaround adapted from a comment on date-fns/date-fns#571[^1] by @bertho-zero, which correctly adjusts the new date based on the time zone offsets, and means that `dates` is built as expected. Fixes rust-lang#5477. [^0]: date-fns/date-fns#571 [^1]: date-fns/date-fns#571 (comment)
- Loading branch information