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

Problems with POSIXct in R 4.3.2 #1146

Open Mkranj opened 9 months ago

Mkranj commented 9 months ago

I've been getting some errors using POSIXct with Lubridate when switching to R version 4.3.2. One example:

lubridate::floor_date(as.POSIXct("2022-12-15 09:59:50"), unit = "day")

I get this error : Error in C_time_floor(to_posixct(time), nu$unit, nu$n, as.integer(week_start), : CCTZ: Invalid timezone of the input vector: ""

This also happens with R 4.2.2. When I switch to R 4.1.3, it works fine and I get the expected result: "2022-12-15 CET" I'm using R on Windows. Lubridate is version 1.9.3.

Mkranj commented 9 months ago

I've read through this similar issue and can confirm I tried removing then installing lubridate on R 4.3.2 and the error still persists.

BMorseSAW commented 6 days ago

I am also experiencing the issue around timezones since updating R from 4.0.5 to 4.2.2 and 4.3.2. I have reverted back to 4.0.5 and the issue goes away. I am using lubridate 1.9.3. I have tried uninstalling and reinstalling lubridate. I have also played with the solutions or workarounds in the above similar issue.