Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <vtzrules.h>
Link against: tzclient.lib

Class TTzRule

class TTzRule;

Description

Encapsulates one time zone rule.

Members

Defined in TTzRule:


Construction and destruction


TTzRule(TInt16,TInt16,TInt16,TInt16,TMonth,TTzRuleDay,TUint8,TUint8,TTzTimeReference,TUint16)

IMPORT_C TTzRule(TInt16 aFromYear, TInt16 aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange);

Description

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()

IMPORT_C TTzRule();

Description

Default constructor for a time zone rule.

All member variables are set to zero values.


TTzRule(const TTzRule &)

IMPORT_C TTzRule(const TTzRule &aRule);

Description

Copy constructor for a time zone rule.

Parameters

const TTzRule &aRule


TTzRule(TTimeWithReference,TTimeWithReference,TInt16,TInt16,TMonth,TTzRuleDay,TUint8,TUint8,TTzTimeReference,TUint16)

IMPORT_C TTzRule(TTimeWithReference aFromYear, TTimeWithReference aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange);

Description

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.

[Top]


Member functions


Actualise(TInt)const

Interface status: deprecated

IMPORT_C TVTzActualisedRule Actualise(TInt aYear) const;

Description

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.

Deprecated. Use TVTzActualisedRule TTzRule::ActualiseL(TInt)const instead.

Parameters

TInt aYear

Year to actualise time rules

Return value

TVTzActualisedRule

The time zone rule with the precise date and time for the given year.

See also:


ActualiseL(TInt)const

IMPORT_C TVTzActualisedRule ActualiseL(TInt aYear) const;

Description

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.

Parameters

TInt aYear

Year to actualise time rules

Return value

TVTzActualisedRule

The time zone rule with the precise date and time for the given year.

Leave codes

KErrCorrupt

if the current day rule is not one of the defined values in TTzRuleDay

[Top]


Member data


iFrom

TTimeWithReference iFrom;

Description


iTo

TTimeWithReference iTo;

Description


iOldLocalTimeOffset

TInt16 iOldLocalTimeOffset;

Description


iNewLocalTimeOffset

TInt16 iNewLocalTimeOffset;

Description


iMonth

TMonth iMonth;

Description


iDayRule

TTzRuleDay iDayRule;

Description


iDayOfMonth

TUint8 iDayOfMonth;

Description


iDayOfWeek

TUint8 iDayOfWeek;

Description


iTimeReference

TTzTimeReference iTimeReference;

Description


iTimeOfChange

TUint16 iTimeOfChange;

Description


iReserved

TUint32 iReserved;

Description