EPOC   SDK Home Glossary Indexes Previous Next Up

CParserPropertyValueDateTime class


Contents


CParserPropertyValueDateTime class — Single date/time property value

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

CBase

Abstract: CBase behaviour.

CParserPropertyValue

Abstract: Base class for all property values.

CParserTimePropertyValue

Abstract: Base class for all date and time property values.

Defined in

vprop.h

Link against

versit.lib

Description

Date/time property value. Derived from CParserTimePropertyValue, this class adds the ability to externalize the date time property value, and to convert between a machine's local time and universal time.

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


Construction and destruction


CParserPropertyValueDateTime() — C++ constructor with TVersitDateTime value

CParserPropertyValueDateTime(TVersitDateTime* aValue);

Description

Constructs a CParserPropertyValueDateTime with a TVersitDateTime value.

Arguments

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

~CParserPropertyValueDateTime();

Description

The destructor frees all resources owned by the property, prior to its destruction.


Time conversion


ConvertAllDateTimesToUTCL() — Convert date/time to universal time

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

Description

This function 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.

Arguments

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() — Convert date/time to local time

void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement);

Description

If the CParserPropertyValueDateTime object's date/time value is stored as universal time, this function converts it into the local time for the target machine.

It does this by adding the value specified in aIncrement to the date/time value.

Arguments

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.


Property value


Value() — Get the date/time value

TVersitDateTime* Value() const;

Description

Returns a pointer to the date/time value.

Return value

TVersitDateTime*

Pointer to the date/time value.

EPOC       SDK Home Glossary Indexes Previous Next Up