#include <vtzrules.h>
Link against: tzclient.lib
class CVTzActualisedRules : public CBase |
Public Member Functions | |
---|---|
~CVTzActualisedRules() | |
IMPORT_C void | AddRuleL(const TVTzActualisedRule &) |
IMPORT_C TInt | Count() |
IMPORT_C TInt | EndYear() |
IMPORT_C TInt | GetOffsetFromRuleL(const TTime &, TTzTimeReference) |
IMPORT_C TBool | IsDaylightSavingOn(TTime &) |
IMPORT_C CVTzActualisedRules * | NewL(TInt, TInt) |
IMPORT_C TInt | StartYear() |
IMPORT_C TVTzActualisedRule & | operator[](TInt) |
Encapsulates a collection of the local time changes occurring during a range of years.
IMPORT_C void | AddRuleL | ( | const TVTzActualisedRule & | aRule | ) |
Add an actualised rule to the collection.
Parameters | |
---|---|
aRule | An actualised rule to be added into the collection. |
IMPORT_C TInt | Count | ( | ) | const |
Returns number of rules currently held in array of rules.
IMPORT_C TInt | EndYear | ( | ) | const |
Returns max year of the year range the CVTzActualisedRules object describes the rules for.
IMPORT_C TInt | GetOffsetFromRuleL | ( | const TTime & | aTime, |
TTzTimeReference | aTimeRef | |||
) | const |
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 | |
---|---|
aTime | - time of interest |
aTimeRef | - time reference for the aUserTime (UTC or wall-time) note: ETzStdTimeReference for aTimeRef is not supported, will panic with RTz::EPanicUnsupportedTimeReference. |
Parameters | |
---|---|
aTime | The time of interest given in UTC. |
Panic Codes | |
---|---|
5 | if aTime is not covered by the current set of time zone rules. |
7 | if one of the time zone rules uses standard time reference. |
IMPORT_C CVTzActualisedRules * | NewL | ( | TInt | aStartYear, |
TInt | aEndYear | |||
) | [static] |
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() 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 | |
---|---|
aEndYear | - specify range of years for to which actualised rules apply. |
Panic Codes | |
---|---|
IMPORT_C TInt | StartYear | ( | ) | const |
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.
IMPORT_C TVTzActualisedRule & | operator[] | ( | TInt | aIndex | ) | const |
Returns specified TVTzActualisedRule.
Parameters | |
---|---|
aIndex | Index of a rule |
Panic Codes | |
---|---|