facebook/prophet

Time zone issue when fitting prophet in R

alejandrohagan opened this issue · 1 comments

Hi,

I believe I have a timezone issue when fitting a prophet model in R -- I understand it to be related to prophet package.

Running the example in the documentation, I get the below error

'Error in C_force_tz(to_posixct(time), tz, roll_dst) :
CCTZ: Unrecognized output timezone: "GMT"'

I understand from a related closed error this time zone issue should be closed (#1501) however I can reproduce it. I've uninstalled and reinstalled lubridate, prophet and rstan and use the released version and development versions of lubridate and prophet.


history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
                      y = sin(1:366/200) + rnorm(366)/10)

history %>% 
  prophet::prophet()

When I try to change the timezone to GMT, the error is amended to the below

Error in C_force_tz(to_posixct(time), tz, roll_dst) : CCTZ: Unrecognized timezone of the input vector: ""

history %>% 
  mutate(ds=as.POSIXct.Date(ds,tz="EST")) %>%
  prophet::prophet()

Below is my r.session info

R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

It is not an issue with prophet but with lubridate and dependencies.

Running uninstalling timechange and reinstalling devtools::install_github("vspinu/timechange") fixed the issue