tidyverse / lubridate

Make working with dates in R just that little bit easier
https://lubridate.tidyverse.org
GNU General Public License v3.0
731 stars 207 forks source link

Notice user about cache after updating R? #1065

Closed msberends closed 2 years ago

msberends commented 2 years ago

We had the problem described in #928 and #945:

lubridate::now()
#> [1] "2021-01-17 21:33:32 MST"
#> Warning message:
#> In with_tz(Sys.time(), tzone) : Unrecognized time zone ''

More specific:

lubridate:::C_valid_tz("")
#> [1] FALSE

This was caused because we updated R from 4.1.3 to 4.2.1 on Windows; reinstalling lubridate solved it as confirmed by others. Would it be an idea to notify the user that this might solve things? It seems that some cache was used by lubridate or so?

We found lots and lots of cases of this error around the internet (here, StackOverflow, RStudio Community). Would be great if future people wouldn't need to search for so long 🙂

vspinu commented 2 years ago

The solution is easily found on the web, or on github (including this issue). Also it might be a genuine problem with the database, so the simple and generic solution of re-installing the package would not apply.

Given that it's a one-off problem I think we are good as it is :wink: