timeZoneList(...)
.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
.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:
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.)
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