timeZone
classes represent time zones.
timeZone
is a virtual class and has no slots.character
) the name of a built-in time zone.
integer
) the offset from GMT (in seconds) when not on daylight savings time.
data.frame
) rules encoding when to go on daylight savings time (see below).
timeDate
objects, including reading times from character data,
writing times as character data, and converting between time zones.
However, normally the names listed in the table are not used directly,
because users want to use the names commonly used in their
areas, such as CST for Central Standard Time in the US, Canada, or
Australia. The correspondence between "convenient" and "official" names
is set up using the timeZoneList
function.timeZoneR
class. This
class allows specification of a time zone with an offset from GMT,
in seconds, in the offset
slot, and a data frame containing rules
for when and how to go on daylight savings time in the rules
slot.
(If there is no daylight savings time in this time zone, the data frame
should be empty or have 0 rows.) Each row in the rules data frame
encodes a range of years' daylight savings rules; they must be in
order to work properly. The rules are encoded in the following
columns of the data frame (which must be in order, and all of class
integer):
yearfrom |
starting year for rules, or -1 to start at the beginning of time. |
yearto |
ending year for rules, or -1 to end at the end of time. |
hasdaylight |
indicates whether daylight savings time is used in this year range. Note that this is an integer value, 1 or 0, for true or false. |
dsextra |
offset (in seconds) to add to the regular offset when daylight time is in effect. |
monthstart |
month (1-12) in which daylight savings time starts (may be before
monthend for southern hemisphere). |
codestart |
code telling how to interpret daystart
and xdaystart to calculate the day
within the month for starting daylight savings time. |
1 = start on the daystart (1-31) day of the month. |
2 = start on the last daystart (0-Sunday through 6-Saturday) weekday
in the month. |
3 = start on the first daystart weekday (0-Sunday through 6-Saturday)
on or after the xdaystart (1-31) day of the month. |
4 = start on the last daystart weekday (0-Sunday through 6-Saturday)
on or before the xdaystart (1-31) day of the month. |
daystart |
see codestart . |
xdaystart |
see codestart . |
timestart |
seconds after midnight local standard time to start daylight savings time,
on the day specified by codestart , and so on. |
monthend |
month (1-12) in which daylight savings time ends (may be after
monthstart for southern hemisphere). |
codeend |
code telling how to interpret dayend
and xdayend to calculate the day within the month
for ending daylight savings time. |
1 = end on the dayend (1-31) day of the month. |
2 = end on the last dayend (0-Sunday through 6-Saturday) weekday
in the month. |
3 = end on the first dayend weekday (0-Sunday through 6-Saturday)
on or after the xdayend (1-31) day of the month. |
4 = end on the last dayend weekday (0-Sunday through 6-Saturday)
on or before the xdayend (1-31) day of the month. |
dayend |
see codeend . |
xdayend |
see codeend . For examples, see the timeZoneR function. To use user-defined time
zones, you must put them in the time zone list (see timeZoneList function). |
timeend |
seconds after midnight local standard time to end daylight savings time,
on the day specified by codeend , etc. |
timeZone
class is a virtual class for time zones. All
time zones classes have an is
relationship with timeZone
. The timeZoneC
class is a placeholder for a built-in time
zone, and it has only one slot, which is the official name of the zone;
it extends timeZone
.
The timeZoneR
class is for user-defined time zones, and also extends
timeZone
.
timeZoneC
function, timeZoneR
function, timeZoneList
function.