Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: vprop.h
Link against: versit.lib

Class CParserPropertyValueDateTime

CParserPropertyValueDateTime

Support

Supported from 5.0

Description

A date/time property value. The date/time value is contained in a TVersitDateTime object. The member functions of class TDateTime may be used to extract the date and time components from TVersitDateTime::iDateTime.

To find out the property value type, use Uid() defined in the base class CParserPropertyValue. A date/time property UID has the value KVersitPropertyDateTimeUid.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CParserPropertyValueAbstract base class for all property values
CParserPropertyValueDateTimeA date/time property value
CParserTimePropertyValueAbstract base class for all of the date/time property value classes (CParserPropertyValueAlarm, CParserPropertyValueDate, CParserPropertyValueDateTime, CParserPropertyValueMultiDateTime, CParserPropertyValueDaylight, CParserPropertyValueRecurrence)

Defined in CParserPropertyValueDateTime:
CParserPropertyValueDateTime(), ConvertAllDateTimesToUTCL(), ConvertAllUTCDateTimesToMachineLocalL(), Value(), ~CParserPropertyValueDateTime()

Inherited from CBase:
operator new()

Inherited from CParserPropertyValue:
EncodeL(), ExternalizeL(), IsAsciiCharacterSetSufficient(), Uid()

Inherited from CParserTimePropertyValue:
SupportsInterface()


Construction and destruction


CParserPropertyValueDateTime()

CParserPropertyValueDateTime(TVersitDateTime* aValue);

Description

Constructs a CParserPropertyValueDateTime with a TVersitDateTime. Sets the property value’s UID to KVersitPropertyDateTimeUid.

Parameters

TVersitDateTime* aValue

Pointer to the date/time specification, including information about the date/time, for instance whether the time is specified in universal time, or in the machine's local time. The property value takes ownership of the pointer.


~CParserPropertyValueDateTime()

~CParserPropertyValueDateTime();

Description

Frees all resources owned by the property value, prior to its destruction.

[Top]


Time conversion


ConvertAllDateTimesToUTCL()

void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight);

Description

Converts the CParserPropertyValueDateTime object's date/time value into universal time. The function has no effect if the value is already stored as universal time.

The number of seconds specified in aIncrement is added to the date/time, then the resulting date/time is modified by the daylight saving offset specified in aDaylight, if applicable.

Parameters

const TTimeIntervalSeconds& aIncrement

A time interval in seconds which represents the negative of the time zone of the originating machine. For instance, if the time zone is +04:30, aIncrement should be set to – 04:30.

const CVersitDaylight* aDaylight

Pointer to the specification for daylight saving. If a date/time value is within the period for daylight saving, the date/time is modified by the daylight saving offset.


ConvertAllUTCDateTimesToMachineLocalL()

void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement);

Description

Converts the CParserPropertyValueDateTime object's date/time into the local time for the target machine if it is stored as universal time.

Parameters

const TTimeIntervalSeconds& aIncrement

A time interval in seconds to add to the date/time. This should normally be the universal time offset for the machine's locale.

[Top]


Property value


Value()

TVersitDateTime* Value() const;

Description

Gets a pointer to the date/time value.

Return value

TVersitDateTime*

Pointer to the date/time value.