问题
when R was throwing warning messages on this command
`setwd("~/Desktop/Project R")
Warning message:
In format.POSIXlt(as.POSIXlt(x), ...) :
unknown timezone 'default/Asia/Kolkata'`
So, I tried creating a date for this TZ by entering
as.POSIXct("2017-11-01 10:52", "%Y-%m-%d %H:%M", tz = "Asia/Kolkata")
[1] "2017-11-01 10:52:00 IST"
Warning messages:
1: In strptime(x, format, tz = tz) :
unknown timezone 'default/Asia/Kolkata'
2: In as.POSIXct.POSIXlt(as.POSIXlt(x, tz, ...), tz, ...) :
unknown timezone 'default/Asia/Kolkata'
3: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'default/Asia/Kolkata'
but the warning messages refuses to go? Is there a solution to permanently overcome these warnings.
回答1:
I've the some issue, if your on High Sierra it seems to be a bug between OS HS and R 3.4.2 as it is said in this post https://github.com/stan-dev/rstan/issues/455 Following the instructions (until R 3.4.3 will finally release) works for me. I do:
Sys.setenv(TZ="Europe/Madrid")
Now I can load packages, and use as.POSIXct and no messages pop up. Hope it helps!
来源:https://stackoverflow.com/questions/47048864/warning-on-on-posixltas-posixltx