简体   繁体   English

如何将时区设置为太平洋标准时间?

[英]How do I set my timezone to pacific standard time?

Noob question - I'm trying to set my timezone to PST but keep getting unknown timezone warnings. 新手提问-我正在尝试将我的时区设置为PST,但是不断收到未知的时区警告。 My macbook's timezone is set but isn't communicating with R and R doesn't seem to like my request for PST. 我的Macbook的时区已设置,但未与R通信,R似乎不喜欢我的PST请求。 I'm sure this is an easy fix but can't seem to find any solutions that have worked yet. 我确定这是一个简单的解决方法,但似乎找不到有效的解决方案。 Thanks in advance! 提前致谢!

Script/console showing warning message: unknown timezone 脚本/控制台显示警告消息:未知时区

There is a potential answer on the R-bloggers website here . 还有就是R-博客网站上的一个潜在的答案在这里

It combines the above comment: Sys.setenv(TZ="America/Los_Angeles") with some background info on the problem. 它结合了上面的注释: Sys.setenv(TZ="America/Los_Angeles")与有关此问题的一些背景信息。

Also, see this question on StackOverflow here . 另外,请在此处在StackOverflow上查看此问题。

The answer basically states that anything less than version R 3.4.3 will not get along with MacOS 10.13 'High Sierra' for timezones. 答案基本上指出,对于时区,低于版本R 3.4.3的任何内容都不会与MacOS 10.13“ High Sierra”相处。

So check with... 所以请检查...

 R.version[names(R.version) == "version.string"] #OR
 sessionInfo()$R.version$version.string #and if it's less than 3.4.3,

download the latest R version here: https://cran.cnr.berkeley.edu/ 在此处下载最新的R版本: https//cran.cnr.berkeley.edu/

This should fix it. 这应该解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM