CTzRules Class Reference
Link against: tzclient.lib
class CTzRules : public CBase |
Detailed Description
Encapsulates a collection of time zone rules, and includes the period covered by the rules and the standard time offset at the start of that period.
Constructor & Destructor Documentation
Member Function Documentation
AddRuleL ( TTzRule )
IMPORT_C void | AddRuleL | ( | TTzRule | aRule | ) | |
Adds a time zone rule to this set.
Parameter | Description | aRule | The rule to be added. |
CloneL ( )
Creates a copy of these timezone rules.
Returns: A pointer to the CTzRules copy.
ConvertTime ( CVTzActualisedRules &, TTime &, TTzTimeReference )
Converts between local (wall-clock) and UTC times.
Parameter | Description | aRules | The actualised rules to use. |
aTime | The time to convert, specified by aTimerRef if the time is in UTC or local time. On return, it will contain the converted time from UTC to local time or vice versa, depending on aTimerRef's value. |
aTimerRef | What aTime is expressed in. |
Returns: KErrNone if successful, otherwise KErrNotSupported or KErrNotFound
ConvertToLocalL ( TTime & )
IMPORT_C void | ConvertToLocalL | ( | TTime & | aUtcTime | ) | const |
Converts the received UTC time to local time.
Parameter | Description | aUtcTime | The time to convert. On return, this contains the converted time. |
ConvertToUtcL ( TTime & )
IMPORT_C void | ConvertToUtcL | ( | TTime & | aLocalTime | ) | const |
Converts the received local time to UTC time.
Parameter | Description | aLocalTime | The time to convert. On return, this contains the converted time. |
CopyL ( const CTzRules & )
IMPORT_C void | CopyL | ( | const CTzRules & | aTzRule | ) | |
Copy a time zone rule to this time zone rule.
Parameter | Description | aTzRule | A rule to copy from. |
Count ( )
IMPORT_C TInt | Count | ( | ) | const |
Gets the number of time zone rules (TTzRules) in this set.
Returns: The number of rules.
EndYear ( )
IMPORT_C TInt | EndYear | ( | ) | const |
Gets the last year in which the time zone rules apply.
ExternalizeL ( RWriteStream & )
Externalises time zone rules to a write stream.
-
leave
- KErrArgument if the output stream size is invalid
Parameter | Description | aStream | Stream to which the object should be externalised. |
GetActualisedRulesL ( CVTzActualisedRules & )
Get actualised rules for time zone rules.
Parameter | Description | aActRules | Actualised rules for time zone rules. |
GetOffsetL ( const TTime &, TTzTimeReference )
Calculate the local time offset at the supplied time.
Returns: local time offset
InitialStdTimeOffset ( )
IMPORT_C TInt | InitialStdTimeOffset | ( | ) | const |
Gets the initial UTC offset for this set of time zone rules.
Returns: The offset in minutes.
InternalizeL ( RReadStream & )
Internalizes time zone rules from a read stream.
Parameter | Description | aStream | Stream from which the object should be internalised. |
IsEqualTo ( const CTzRules & )
Compares two sets of timezone rules.
Parameter | Description | aRules | The timezone rules to compare with. |
Returns: ETrue if the rules are identical. EFalse if not.
NewL ( )
Creates a new time zone rules object.
Returns: Pointer to the time zone rules.
NewL ( TInt, TInt )
Creates a new time zone rules object.
Parameter | Description | aStartYear | The first year in which these time zone rules apply. |
aEndYear | The last year in which these time zone rules apply. |
Returns: Pointer to the time zone rules.
NewL ( RReadStream & )
Creates a new time zone rules object from a stream.
Parameter | Description | aStream | Stream with the time zone rules to be used to create a CTzRules object. |
Returns: Pointer to the time zone rules.
RemoveRule ( TInt )
IMPORT_C void | RemoveRule | ( | TInt | aIndex | ) | |
Removes a time zone rule from this set.
Parameter | Description | aIndex | The index of the rule to be removed. |
RulesApply ( const TTime & )
Queries the time zone rule set to see if they apply to a specified time.
Parameter | Description | aTime | The time to be checked, using the same time reference used when constructing CTzRules. |
Returns: ETrue if the time zone rules apply to the specified time. EFalse if not.
SetEndYear ( TInt )
IMPORT_C void | SetEndYear | ( | TInt | aYear | ) | |
Sets the last year in which the time zone rules apply.
Parameter | Description | aYear | The year. |
SetInitialStdTimeOffset ( TInt )
IMPORT_C void | SetInitialStdTimeOffset | ( | TInt | aOffset | ) | |
Sets the initial UTC offset for this set of time zone rules.
Parameter | Description | aOffset | The offset in minutes. |
SetStartYear ( TInt )
IMPORT_C void | SetStartYear | ( | TInt | aYear | ) | |
Sets the first year in which the time zone rules apply.
Parameter | Description | aYear | The year. |
SizeOfObject ( )
IMPORT_C TInt | SizeOfObject | ( | ) | const |
Get the object size when it is internalize and externalised.
Returns: the size of thisobject
StartYear ( )
IMPORT_C TInt | StartYear | ( | ) | const |
Gets the first year in which the time zone rules apply.
operator[] ( TInt )
Gets a time zone rule from this set.
Parameter | Description | aIndex | The index of the rule to be fetched. |
Returns: Reference to the time zone rule.