Returns or modifies the time zone list.
timeZoneList(...)
returns the value of the time zone list before the function call is returned. If arguments are given, it is returned invisibly.
(see below)
If arguments are given, they are used to modify the current value
of .time.zone.list
, which is assigned in the splusTimeDate
package environment.
It is like timeDateOptions
, where if you want your entries to the time zone list to persist in
subsequent sessions, you should use timeZoneList
in .First
.
The time zone list is a named list whose names are the character strings that
are recognized when you convert strings to time objects, and
whose elements are the corresponding time zone objects. (See the
documentation for class timeZone
.) The
timeZoneList
function provides an easy way for the user to define
the character strings to use for input of given time zones, and
to define user-defined time zones for use in timeDate
objects.
For example, a North American user would
probably want to recognize "EST" as the US or Canadian time zone
known as Eastern Standard Time, whereas an Australian user might prefer to
have "EST" refer to Eastern Australian time.
The timeZoneList
function has the following behavior:
If no arguments are given, the current time zone list is returned.
If a single list is given as the argument, its named components are added to the time zone list.
If multiple named arguments are given, they are added to the list.
In either of the two latter
cases, the elements to be added to the list must be time zone objects.
The default time zone list has the following built-in zone components.
(See documentation on the timeZone
class for more information.)
can/atlantic (Standard/daylight Canadian Atlantic time)
can/atlantic
can/atlantic
can/atlantic
st/atlantic (Atlantic Standard Time, Puerto Rico and Virgin Islands)
us/eastern (Standard/daylight US Eastern time)
us/eastern
us/eastern
us/eastern
us/eastern
st/eastern (Standard only US/Canadian Eastern time)
can/eastern (Standard/daylight Canadian Eastern time)
us/central (Standard/daylight US Central time)
us/central
us/central
us/central
us/central
us/central
can/central (Standard/daylight Canadian Central time)
us/mountain (Standard/daylight US Mountain time)
us/mountain
us/mountain
us/mountain
us/mountain
us/mountain
st/mountain (Standard only US/Canadian Mountain time)
can/mountain (Standard/daylight Canadian Mountain time)
us/pacific (Standard/daylight US Pacific time)
us/pacific
us/pacific
us/pacific
us/pacific
can/pacific (Standard/daylight Canadian Pacific time)
us/alaska (Standard/daylight US Alaska time)
us/alaska
us/alaska
us/alaska
us/hawaii (Standard/daylight US Hawaii/Aleutian time)
st/hawaii (Standard only US Hawaii/Aleutian time)
st/hawaii
st/samoa (Standard time for Samoa)
st/samoa
st/samoa
st/japan (Standard time for Japan)
st/japan
st/japan
st/china (Standard time for China and Western Australia)
hongkong (Standard/daylight time for Hong Kong)
singapore (Standard time for Singapore, reflecting changed zones in 1982)
aust/nsw (Standard/summer time for New South Wales, Australia)
aust/tasmania (Standard/summer time for Tasmania, Australia)
aust/victoria (Standard/summer time for Victoria, Australia)
aust/south (Standard/summer time for South Australia)
st/caustralia (Standard only time for Central Australia)
aust/western (Standard/daylight time for Western Australia)
newzealand (Standard time for New Zealand)
newzealand
newzealand
st/newzealand (Marshall Islands Standard Time)
st/newzealand (Wake Islands Standard Time)
st/newzealand (International Date Line East)
st/eaustralia (Chamorro Standard Time - Guam and Northern Mariana Islands)
st/eaustralia (Chamorro Standard Time - Guam and Northern Mariana Islands)
st/eaustralia (Yap Time)
st/eaustralia (Yap Time)
st/caroline (Line Islands Time - Caroline and other Line Islands)
st/caroline (Line Islands Time - Caroline and other Line Islands)
utc (Greenwich Mean Time/Universal Coordinated Time)
utc
britain (Standard time for Great Britain)
britain (Standard time for Great Britain)
britain
europe/west (Standard/summer time for EU members, Western zone)
europe/west (Standard/summer time for EU members, Western zone)
europe/west
europe/west
europe/west
europe/west
europe/central (Standard/summer time for EU members, Central zone)
europe/central
europe/central
europe/central
europe/central
europe/east (Standard/summer time for EU members, Eastern zone)
europe/east
europe/east
timeZoneC
, timeZoneR
, timeZone
class.
# return the entire time zone list
timeZoneList()
# define the string "PDT8PST" to mean US Pacific time
timeZoneList(PDT8PST = timeZoneC("us/pacific"))
# define a time zone for a small island 1/2 hour east of GMT
timeZoneList(small.island = timeZoneR(offset=1800))
Run the code above in your browser using DataLab