[R] List of all times zones in R

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 31 09:08:25 CET 2011


On Mon, 31 Jan 2011, Maithula Chandrashekhar wrote:

> Hi all, in R I have Sys.timezone() function to get the current working
> Time zone. However I want to have a vector to get the list of all
> available time zones, like say, LETTERS gives me all letters. Is there
> any function like that?

No, because the timezones are not 'in R': they are in your OS (as 
?Sys.timezone stresses).  Many OSes do not even has a function to give 
you their name for the current timezone, let alone all others.  Note 
too that an OS often has many names for a single time zone.

Despite the posting guide, you have given us no details of your 
system.  On Windows, the help page says

   A file listing most known time zones can be found at
   R_HOME/share/zoneinfo/zone.tab.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list