timeZoneR {splusTimeDate} | R Documentation |
Constructor Function for timeZoneR
Class
Description
Construct a timeZoneR
object.
Usage
timeZoneR(offset=0, yearfrom=integer(0), yearto=integer(0),
hasdaylight=logical(0), dsextra=integer(0),
monthstart=integer(0), codestart=integer(0),
daystart=integer(0), xdaystart=integer(0),
timestart=integer(0), monthend=integer(0),
codeend=integer(0), dayend=integer(0),
xdayend=integer(0), timeend=integer(0), rules)
Arguments
offset |
the offset from GMT (in seconds) when not on daylight savings time. | |||||||||
yearfrom |
the starting years for rules, or -1 to start at the beginning of time. | |||||||||
yearto |
the ending years for rules, or -1 to end at the end of time. | |||||||||
hasdaylight |
specifies whether daylight savings time is used in each year range. | |||||||||
dsextra |
the offsets (in seconds) to add to the regular offset when daylight time is in effect. | |||||||||
monthstart |
the months (1-12) in which daylight savings time starts (can be after
| |||||||||
codestart |
the codes telling how to interpret
| |||||||||
daystart |
see | |||||||||
xdaystart |
see | |||||||||
timestart |
the seconds after midnight local standard time to start daylight savings time,
on the day specified by | |||||||||
monthend |
the months (1-12) in which daylight savings time ends (can be before
| |||||||||
codeend |
the codes specifying interpreting
| |||||||||
dayend |
see | |||||||||
xdayend |
see | |||||||||
timeend |
the seconds after midnight local standard time to end daylight savings time,
on the day specified by | |||||||||
rules |
a data frame of rules encoding when to go on daylight savings time.
(Overrides all other arguments except |
Details
The arguments other than offset
and rules
define the components
of the rules for when to go on daylight savings.
Each is a vector with one component for each rule.
The timeZoneR
class provides to users a way to define time zones.
To use the defined time zones in timeDate
objects,
they must also be added to the time zone list.
(See timeZoneList
for more information.)
Value
returns a timeZoneR
object with the given name, or the default time zone
if no arguments are supplied.
See Also
timeZoneList
, timeZoneC
, timeZone
class.
Examples
timeZoneR()
timeZoneR(offset=3*3600)
# time zone with daylight time that changed to daylight time on the
# last Sunday in April and last Sunday in September through 1989,
# and then on the 1st Sunday in May and October thereafter.
# Each time change occurs at 2AM local standard time.
timeZoneR( offset = 3600,
yearfrom=c( -1, 1990), yearto=c( 1989, -1 ),
hasdaylight=c( TRUE, TRUE ), dsextra=c( 3600, 3600 ),
monthstart=c( 4, 5 ), codestart=c( 2, 3 ),
daystart=c( 0, 0 ), xdaystart=c(0,1),
timestart=c( 2*3600, 2*3600 ),
monthend=c( 9, 10 ), codeend=c( 2, 3 ),
dayend=c( 0, 0 ), xdayend=c(0,1),
timeend=c(2*3600, 2*3600))