tidyverse / lubridate

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

yearmonth() throws an error with C_force_tz #1166

Open Mkranj opened 2 months ago

Mkranj commented 2 months ago

I'm analysing some timeseries, but I cannot use the yearmonth() function. Running the following code:

yearmonth("2018 January")

I get this error message: Error in C_force_tz(utc, tz, c("boundary", "post")) : CCTZ: Unrecognized output timezone: "Europe/Zagreb".

Reading through similar issues, I can confirm that using lubridate:::tzdir_get() returns a folder that exists, "C:/PROGRA\~1/R/R-43\~1.3/share/zoneinfo" . I've used tzdir_set to explicitly set the full path, and still no use. Changing locale setting to en_US.utf8 still results in the same error.

yearmonth() is actually a function from the tsibble package, however C_force_tz makes me think it could be related to lubridate. I'll reopen the issue on tsibble if you think it's more appropriate.

I'm using lubridate 1.9.3, tsibble 1.1.4 and R 4.3.3. on Windows 11. How can I fix these problems?