TTzRule Class Reference
Encapsulates one time zone rule.
Public Member Functions |
---|
| TTzRule(TInt16, TInt16, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16) |
| TTzRule() |
| TTzRule(const TTzRule &) |
| TTzRule(TTimeWithReference, TTimeWithReference, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16) |
IMPORT_C TVTzActualisedRule | Actualise(TInt) |
IMPORT_C TVTzActualisedRule | ActualiseL(TInt) |
void | ExternalizeL(RWriteStream &) |
void | InternalizeL(RReadStream &) |
TBool
| RuleApplies(const TTime &, const TTime &) |
Constructor & Destructor Documentation
TTzRule(TInt16, TInt16, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16)
Constructor for a time zone rule.
Parameters
TInt16 aFromYear | The first year in which the rule applies. |
TInt16 aToYear | The last year in which the rule applies. |
TInt16 aOldOffset | The UTC offset in minutes which applies before the DST change. |
TInt16 aNewOffset | The UTC offset in minutes which applies after the DST change. |
TMonth aMonth | The month in which the DST change occurs. |
TTzRuleDay aDayRule | The rule defining on which day the DST change takes place. |
TUint8 aDayOfMonth | The number of the day within the month, offset from zero. Used in conjunction with aDayRule to define the day where DST changes. |
TUint8 aDayOfWeek | The number of the day within the week, the numerical equivalent of a TDay value. Used in conjunction with aDayRule to define the day where DST changes. |
TTzTimeReference aTimeReference | Defines whether aTimeOfChange is a local (wall-clock) time or a UTC time. |
TUint16 aTimeOfChange | The time of the DST change in minutes from midnight. |
TTzRule()
Default constructor for a time zone rule.
All member variables are set to zero values.
TTzRule(const TTzRule &)
IMPORT_C | TTzRule | ( | const TTzRule & | aRule | ) | |
Copy constructor for a time zone rule.
TTzRule(TTimeWithReference, TTimeWithReference, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16)
Constructor for a time zone rule.
Parameters
TTimeWithReference aFromYear | The first date at which the rule applies. |
TTimeWithReference aToYear | The last date at which the rule applies. |
TInt16 aOldOffset | The UTC offset in minutes which applies before the DST change. |
TInt16 aNewOffset | The UTC offset in minutes which applies after the DST change. |
TMonth aMonth | The month in which the DST change occurs. |
TTzRuleDay aDayRule | The rule defining on which day the DST change takes place. |
TUint8 aDayOfMonth | The number of the day within the month, offset from zero. Used in conjunction with aDayRule to define the day when DST changes. |
TUint8 aDayOfWeek | The number of the day within the week, the numerical equivalent of a TDay value. Used in conjunction with aDayRule to define the day where DST changes. |
TTzTimeReference aTimeReference | Defines whether aTimeOfChange is a local (wall-clock) time or a UTC time. |
TUint16 aTimeOfChange | The time of the DST change in minutes from midnight. |
Member Functions Documentation
Actualise(TInt)
Parameters
TInt aYear | Year to actualise time rules |
ActualiseL(TInt)
Resolves the date rule to the precise date and time for the given year, and returns it in a TVTzActualisedRule
For day rules ETzDayAfterDate & ETzDayBeforeDate, the reference date entered is inclusive in the calculation. ie. If the reference date fits the criteria, the reference date will be returned.
eg. Actualise(Friday, ETzDayAfterDate, Fri Jun 22, 2007) returns Jun 22, 2007.
-
leave
- KErrCorrupt if the current day rule is not one of the defined values in TTzRuleDay
Parameters
TInt aYear | Year to actualise time rules |
ExternalizeL(RWriteStream &)
Externalises a time zone rule to a write stream.
Parameters
RWriteStream & aStream | Stream to which the object should be externalised. |
InternalizeL(RReadStream &)
Internalizes a time zone rule from a read stream.
Parameters
RReadStream & aStream | Stream from which the object should be internalised. |
RuleApplies(const TTime &, const TTime &)
Check if a time zone rule is applicable during a time range.
Parameters
const TTime & aStart | Start of time range, inclusively. ie. For a rule to be applicable, this time can be equal to or earlier than the rule's end time. This time should use the same time reference used when TTzRule is constructed. |
const TTime & aEnd | End of time range, exclusively. ie. In order for a rule to be applicable, this time must be later than the rule's start time. This time should use the same time reference used when TTzRule is constructed. |
Member Data Documentation
TInt16
iNewLocalTimeOffset
TInt16
iOldLocalTimeOffset
TTzTimeReference
iTimeReference
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.