#include <vtzrules.h>
Link against:
tzclient.lib
Class CVTzActualisedRules
class CVTzActualisedRules : public CBase;
Description
Encapsulates a collection of the local time changes occurring during a range of years.
Derivation
CBase
-
Base class for all classes to be instantiated on the heap.
CVTzActualisedRules
- Encapsulates a collection of the local time changes occurring during a range of ...
Members
Defined in CVTzActualisedRules
:
Inherited from CBase
:
Construction and destruction
IMPORT_C static CVTzActualisedRules* NewL(TInt aStartYear, TInt aEndYear);
Description
Factory method for CVTzActualisedRules objects. Creates a new instance of CVTzActualizedRules - an array of actualised rules
(TVTzActualisedRule
).
The array of rules can be populated later by invoking CTzRules::GetActualisedRulesL(CVTzActualisedRules &)const
method.
Rules in the array are sorted ascending by rule's start time (TVTzActualisedRule::iTimeOfChange
); The very first rule in the array, if present, defines "default standard rule" for the time zone indicating the STD time
offset from UTC, in effect from the start of the first year (aStartYear).
Parameters
Return value
Panic codes
RTz |
10 if aStartYear is larger than aEndYear.
|
|
IMPORT_C ~CVTzActualisedRules();
Description
Destructor.
AddRuleL(const TVTzActualisedRule &)
IMPORT_C void AddRuleL(const TVTzActualisedRule &aRule);
Description
Add an actualised rule to the collection.
Parameters
IMPORT_C TInt Count() const;
Description
Returns number of rules currently held in array of rules.
Return value
IMPORT_C TVTzActualisedRule& operator[](TInt aIndex) const;
Description
Returns specified TVTzActualisedRule
.
Parameters
TInt aIndex |
Index of a rule
|
|
Return value
Panic codes
RTz |
4 if aIndex is out of bounds.
|
|
IMPORT_C TInt StartYear() const;
Description
Returns min year of the year range the CVTzActualisedRules object describes the rules for. It is guaranteed that the array
of rules does not contain any rules for years before that min year.
Return value
TInt
|
Start year (e.g. 1998).
|
|
IMPORT_C TInt EndYear() const;
Description
Returns max year of the year range the CVTzActualisedRules object describes the rules for.
Return value
TInt
|
End year (e.g. 2005).
|
|
IsDaylightSavingOn(TTime &)const
IMPORT_C TBool IsDaylightSavingOn(TTime &aTime) const;
Description
Tells if Daylight Savings Applies for the current time zone at the current time
Parameters
TTime &aTime |
The time of interest given in UTC.
|
|
Return value
TBool
|
EFalse if Daylight Savings does not apply (winter time) and ETrue if Daylight Savings does apply
|
|
Panic codes
RTz |
5 if aTime is not covered by the current set of time zone rules.
|
RTz |
7 if one of the time zone rules uses standard time reference.
|
|
GetOffsetFromRuleL(const TTime &,TTzTimeReference)const
IMPORT_C TInt GetOffsetFromRuleL(const TTime &aTime, TTzTimeReference aTimeRef) const;
Description
Receives a time. Finds out which of these rules applies at the received time and returns the offset in effect at the specified
time.
Leaves with KErrNotFound, if it doesn't find the rule (i.e. aTime is earlier than the very first time in CVTzActualisedRules).
Parameters
Return value
TInt
|
TInt - offset from UTC (in minutes).
|
|