Wrong timezones for both `flights` and `weather`?
The issue is similar to this issue from nycflights13 except now it looks like flights is on UTC and weather is on local time (for the machine in use) . I think the solution is to use lubridate::force_tz() on the time_hour variable pulling corresponding to timezone from airports::tzone for both?
library(nycflights23)
flights$time_hour[1:5]
#> [1] "2023-01-01 20:00:00 UTC" "2023-01-01 23:00:00 UTC"
#> [3] "2023-01-01 23:00:00 UTC" "2023-01-01 21:00:00 UTC"
#> [5] "2023-01-01 20:00:00 UTC"
weather$time_hour[1:5]
#> [1] "2023-01-01 01:00:00 MST" "2023-01-01 02:00:00 MST"
#> [3] "2023-01-01 03:00:00 MST" "2023-01-01 04:00:00 MST"
#> [5] "2023-01-01 05:00:00 MST"
Created on 2025-04-20 with reprex v2.1.1
Thank you for the issue! Happy to see that you're still getting value from the package. :)
That seems reasonable—would you be game to give a go at a PR? Would be happy to review and get that to CRAN if so—happy to spend some time on a fix in the near future if not.
Tons of use :). Too many areas to explore! I’ll try to block off some time to get this implemented and tested sometime soon. Thanks!
Haven’t been able to squeeze this in. Apologies!
No worries!