Sys.timezone()
[1]“CST”
as.POSIXct("2012-12-12",tz="CST")
[1]“2012-12-12 GMT”
有13个警告(使用警告()来查看它们)
我已将tz设置为CST,但输出为GMT,带有警告消息,出了什么问题?
编辑:
我的操作系统是Windows 7
警告是:
Warning messages:
1: In strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) : unknown timezone 'CST'
2: In as.POSIXct.POSIXlt(x) : unknown timezone 'CST'
3: In strptime(xx, f <- "%Y/%m/%d %H:%M:%OS", tz = tz) : unknown timezone 'CST'
4: In as.POSIXct.POSIXlt(x) : unknown timezone 'CST'
5: In strptime(xx, f <- "%Y-%m-%d %H:%M", tz = tz) : unknown timezone 'CST'
6: In as.POSIXct.POSIXlt(x) : unknown timezone 'CST'
7: In strptime(xx, f <- "%Y/%m/%d %H:%M", tz = tz) : unknown timezone 'CST'
8: In as.POSIXct.POSIXlt(x) : unknown timezone 'CST'
9: In strptime(xx, f <- "%Y-%m-%d", tz = tz) : unknown timezone 'CST'
10: In as.POSIXct.POSIXlt(x) : unknown timezone 'CST'
11: In strptime(x, f, tz = tz) : unknown timezone 'CST'
12: In as.POSIXct.POSIXlt(as.POSIXlt(x, tz, ...), tz, ...) :
unknown timezone 'CST'
13: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'CST'
答案 0 :(得分:0)
答案 1 :(得分:0)
我找到了tz参数的有效名称列表,它们都在本网站的表格中 http://en.wikipedia.org/wiki/List_of_tz_database_time_zones 在名称“TZ”的列中。