CVTzActualisedRules Class Reference

#include <mw/vtzrules.h>

Link against: tzclient.lib

class CVTzActualisedRules : public CBase

Inherits from

  • CVTzActualisedRules

    Detailed Description

    Encapsulates a collection of the local time changes occurring during a range of years.

    Constructor & Destructor Documentation

    ~CVTzActualisedRules ( )

    IMPORT_C~CVTzActualisedRules()

    Destructor.

    Member Function Documentation

    AddRuleL ( const TVTzActualisedRule & )

    IMPORT_C voidAddRuleL(const TVTzActualisedRule &aRule)

    Add an actualised rule to the collection.

    ParameterDescription
    aRuleAn actualised rule to be added into the collection.

    Count ( )

    IMPORT_C TIntCount()const

    Returns number of rules currently held in array of rules.

    Returns: Number of rules.

    EndYear ( )

    IMPORT_C TIntEndYear()const

    Returns max year of the year range the CVTzActualisedRules object describes the rules for.

    Returns: End year (e.g. 2005).

    GetOffsetFromRuleL ( const TTime &, TTzTimeReference )

    IMPORT_C TIntGetOffsetFromRuleL(const TTime &aTime,
    TTzTimeReferenceaTimeRef
    )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).

    ParameterDescription
    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.

    Returns: TInt - offset from UTC (in minutes).

    IsDaylightSavingOn ( TTime & )

    IMPORT_C TBoolIsDaylightSavingOn(TTime &aTime)const
    Tells if Daylight Savings Applies for the current time zone at the current time
    panic
    RTz 5 if aTime is not covered by the current set of time zone rules.
    panic
    RTz 7 if one of the time zone rules uses standard time reference.
    ParameterDescription
    aTimeThe time of interest given in UTC.

    Returns: EFalse if Daylight Savings does not apply (winter time) and ETrue if Daylight Savings does apply

    NewL ( TInt, TInt )

    IMPORT_C CVTzActualisedRules *NewL(TIntaStartYear,
    TIntaEndYear
    )[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).

    panic
    RTz 10 if aStartYear is larger than aEndYear.
    ParameterDescription
    aEndYear- specify range of years for to which actualised rules apply.

    Returns: A pointer to the newly created rules.

    StartYear ( )

    IMPORT_C TIntStartYear()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.

    Returns: Start year (e.g. 1998).

    operator[] ( TInt )

    IMPORT_C TVTzActualisedRule &operator[](TIntaIndex)const

    Returns specified TVTzActualisedRule.

    panic
    RTz 4 if aIndex is out of bounds.
    ParameterDescription
    aIndexIndex of a rule

    Returns: A reference to TVTzActualised rule at index aIndex.