CCTZ: Unrecognized output timezone:

I'm getting an error when I try to assign time zones with lubridate::ymd(). The example uses "Australia/Adelaide" (and fails), I've also tried "America/New_York" from the lubridate::force_tz() example, and my own time zone, "Australia/Brisbane"; they both also fail. However, using "UTC" is fine.

Reprex

    start_date = "2020-04-26"
    start_hour = 0
    time_zone = "Australia/Adelaide"

    start_time = lubridate::ymd(start_date, tz = time_zone) + 
       lubridate::dhours(start_hour)
    #> Error in C_force_tz(time, tz = tzone, roll): CCTZ: Unrecognized output timezone: "Australia/Adelaide"

Created on 2020-11-01 by the reprex package (v0.3.0)

Platform info

sessioninfo::platform_info()
 setting  value                       
 version  R version 4.0.3 (2020-10-10)
 os       macOS Catalina 10.15.7      
 system   x86_64, darwin17.0          
 ui       RStudio                     
 language (EN)                        
 collate  en_AU.UTF-8                 
 ctype    en_AU.UTF-8                 
 tz       Australia/Brisbane          
 date     2020-11-01 

Any ideas what the issue is here? This was working until just Thursday or Friday this week.

Your code runs for me. What version of lubridate are you using?

library(lubridate, warn.conflicts = FALSE)

start_date <- "2020-04-26"
start_hour <- 0
time_zone <- "Australia/Adelaide"

start_time <- lubridate::ymd(start_date, tz = time_zone) +
  lubridate::dhours(start_hour)

start_time
#> [1] "2020-04-26 ACST"

Created on 2020-11-01 by the reprex package (v0.3.0)

Thanks, lubridate version 1.7.9. I also installed the dev version from GitHub. Same issue appears there as well.

Strange...I'm using the same version. Did you update anything recently since you say it was working until earlier this week?

EDIT: Looks like others are facing a similar issue after updating R to version 4.0.3. Check out this GitHub issue. I'm currently using R version 4.0.2.

1 Like

Thank you! I don't know how, but I missed that when I went through the Lubridate issues.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.