> x
[1] "2019-01-01 14:16:19 -0800"
> parse_date_time(x, "%Y-%m-%d %H:%M:%s %z")
[1] "2019-01-01 22:16:19 UTC"
Unrecognized timezone bug in Lubridate 1.7.4 to 1.7.9 when trying to use a specific timezone, fixed in issue 928 in 1.7.10
> lubridate::with_tz(Sys.time(), "America/Vancouver")
[1] "2021-09-07 17:00:52 PDT"
Warning message:
In with_tz(x, tz) : Unrecognized time zone 'America/Vancouver'
- upgraded to 1.7.10 and it worked (bug was in 1.7.4 to 1.7.9 ),
Timezones not working since the update to R 4.0.3 #928
> packageVersion("lubridate")
[1] ‘1.7.9’
> remove.packages("lubridate")
> install.packages("lubridate")
> packageVersion("lubridate")
[1] ‘1.7.10’
> lubridate::with_tz(Sys.time(), "America/Vancouver")
[1] "2021-09-07 17:29:23 PDT"
Previously
Leave a comment on github