简体   繁体   中英

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. My macbook's timezone is set but isn't communicating with R and R doesn't seem to like my request for 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 .

It combines the above comment: Sys.setenv(TZ="America/Los_Angeles") with some background info on the problem.

Also, see this question on StackOverflow here .

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.

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/

This should fix it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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