[R] POSIX time zone codes

Don MacQueen macq at llnl.gov
Wed Mar 8 23:05:25 CET 2006


I would have suggested "US/Central", by analogy with "US/Pacific" 
which I use on my unix-like Mac OS X 10.3.9 system. I don't know what 
might be "common knowledge" in UNIX circles, but here's a bit of 
information from my system.

It has a directory named /usr/share/zoneinfo.

zoneinfo[166]% pwd
/usr/share/zoneinfo

zoneinfo[167]% ls | grep DT
CST6CDT
EST5EDT
MST7MDT
PST8PDT

There are files named GMT, UTC, GB, and a number of others.

There are numerous subdirectories, including for example, "Asia", 
"Australia", "Europe", "US".

zoneinfo[168]% cd US
US[169]% ls
./              Aleutian        East-Indiana    Indiana-Starke  Pacific
../             Arizona         Eastern         Michigan        Pacific-New
Alaska          Central         Hawaii          Mountain        Samoa

This suggests to me that valid values for the tz argument are 
relative paths to files /usr/share/zoneinfo, but I don't know that 
for a fact.

-Don

At 9:22 AM -0500 3/7/06, Jason Horn wrote:
>Thank you again Gabor, that did the trick.  Any thoughts on where I 
>go go for a reference for these time codes?  Where did you get 
>"CDT6CST" from?  Or is this just one of those things that is "common 
>knowledge" in UNIX circles.
>
>To the R developers:  I recommend a sentence be added to the manual 
>for as.POSIXxx such as "vales for tz are system dependent, examples 
>for common systems are....."
>
>
>
>
>Thanks!
>
>
>On Mar 7, 2006, at 9:00 AM, Gabor Grothendieck wrote:
>
>>  Only "" and "GMT" are really guaranteed to work on all systems
>>  since the time zones are system dependent but try: "CDT6CST"
>>  and see if that works on your system.
>>
>>
>>  On 3/7/06, Jason Horn <jhorn at bu.edu> wrote:
>>>  Whoops,
>>>
>>>  [EDIT]
>>>
>>>  as.POSIX(x, tz="UTC")  ... works, gives UTC times
>>>  as.POSIX(x, tz="EST")  ... works, gives EST times
>>>
>>>  as.POSIX(x, tz="CST")  ... does NOT work, gives UTC times
>>>
>>>  [/EDIT]
>>>
>>>  On Mar 7, 2006, at 8:05 AM, Jason Horn wrote:
>>>
>>>>  as.POSIX(x, tz="UTC")  ... works, gives UTC times
>>>>  as.POSIX(x, tz="UTC")  ... works, gives EST times
>>>>
>>>>  as.POSIX(x, tz="CST")  ... does NOT work, gives UTC times
>>>
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>>  ______________________________________________
>>>  R-help at stat.math.ethz.ch mailing list
>>>  https://stat.ethz.ch/mailman/listinfo/r-help
>>>  PLEASE do read the posting guide! http://www.R-project.org/posting-
>>>  guide.html
>>>
>>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA




More information about the R-help mailing list