CVTzActualisedRules Class Reference
class CVTzActualisedRules : public CBase |
Encapsulates a collection of the local time changes occurring during a range of years.
Constructor & Destructor Documentation
CVTzActualisedRules(TInt, TInt)
CVTzActualisedRules | ( | TInt | aStartYear, |
| TInt | aEndYear |
| ) | [private] |
CVTzActualisedRules()
CVTzActualisedRules | ( | ) | [private] |
~CVTzActualisedRules()
IMPORT_C | ~CVTzActualisedRules | ( | ) | |
Member Functions Documentation
AddRuleL(const TVTzActualisedRule &)
Add an actualised rule to the collection.
CompareTimesWithRef(TTime, TTzTimeReference, TTime, TTzTimeReference, TInt, TTimeIntervalMinutes &)
Compares two times with time references (TTzTimeReference). TTzTimeReference is either ETzUtcTimeReference or ETzWallTimeReference.
If time references for both aRolloverTime and aUserTime are the same, then straight comparison is done. Otherwise aRolloverTime is converted to match the time reference of aUserTime.
Parameters
TTime aRolloverTime | - the time of change from/to Daylight Savings Time (DST) |
TTzTimeReference aTimeRefRollover | - the time reference used in aRolloverTime |
TTime aUserTime | - the time provided by the user to compare with |
TTzTimeReference aTimeRefUser | - the time reference used for the user time |
TInt aOldWallOffset | - the offset that is active before aRolloverTime happens |
TTimeIntervalMinutes & aDiffMinutes | |
Count()
IMPORT_C TInt | Count | ( | ) | const |
Returns number of rules currently held in array of rules.
EndYear()
IMPORT_C TInt | EndYear | ( | ) | const |
GetOffsetFromRuleL(const TTime &, TTzTimeReference)
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
const TTime & aTime | - time of interest |
TTzTimeReference aTimeRef | - time reference for the aUserTime (UTC or wall-time) note: ETzStdTimeReference for aTimeRef is not supported, will panic with RTz::EPanicUnsupportedTimeReference. |
IsDaylightSavingOn(TTime &)
IMPORT_C TBool | IsDaylightSavingOn | ( | 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.
Parameters
TTime & aTime | The time of interest given in UTC. |
NewL(TInt, TInt)
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.
Parameters
TInt aStartYear | |
TInt aEndYear | - specify range of years for to which actualised rules apply. |
StartYear()
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.
operator[](TInt)
Parameters
TInt aIndex | Index of a rule |
Member Data Documentation
RArray< TVTzActualisedRule > iRules
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.