Tools.h++ Manual
21-238 104011 Tandem Computers Incorporated
21
Given these definitions,
RWZone::local(new RWZoneSimple(RWZone::USCentral, 
&usRuleLate))
;
is equivalent to the first example given above and repeated here:
RWZone::local(new RWZoneSimple(RWZone::USCentral))
;
Daylight savings time systems that cannot be represented with 
RWDaylightRule 
and 
RWZoneSimple 
must be modeled by deriving from 
RWZone 
and implementing its virtual functions.
For example, under Britain’s madcap Summer Time rules, alternate 
timekeeping begins the morning after the third Saturday in April, unless that is 
Easter (in which case it begins the week before) or unless the Council decides 
on some other time for that year. In some years Summer Time has been two 
hours ahead, or has extended through winter without a break. British Summer 
Time clearly deserves a 
RWZone 
class all its own.
Constructors
RWZoneSimple(RWZone::StdZone zone, RWZone::DstRule = 
RWZone::NoAm)
;
Constructs an 
RWZoneSimple 
instance using internally held 
RWDaylightRules
. This is the simplest interface to 
RWZoneSimple
. The first 
argument is the time zone for which an 
RWZoneSimple 
is to be constructed. 
The second argument is the daylight savings time rule which is to be followed.
RWZoneSimple(const RWDaylightRule* rule,
long tzoff, const RWCString& tzname,
long altoff, const RWCString& altname)
;
Constructs an 
RWZoneSimple 
instance which Daylight Savings Time is 
computed according to the rule specified. Variables 
tzoff 
and 
tzname 
are the 
offset from UTC (in seconds, positive if west of 0 degrees longitude) and the 
name of standard time. Arguments 
altoff 
and 
altname 
are the offset 
(typically equal to 
tzoff - 3600
) and name when daylight savings time is in 
effect. If 
rule 
is zero, daylight savings time is not observed.
RWZoneSimple(long tzoff, const RWCString& tzname)
;
Constructs an 
RWZoneSimple 
instance in which Daylight Savings Time is not 
observed. Argument 
tzoff 
is the offset from UTC (in seconds, positive if west 
of 0 degrees longitude) and 
tzname 
is the name of the zone.










