TCalTime Class Reference

#include <app/caltime.h>

Link against: calinterimapi.lib

class TCalTime
Public Member Enumerations
enumTTimeMode { EFloating, EFixedUtc, EFixedTimeZone }
Public Member Functions
TCalTime()
IMPORT_C TTimeMaxTime()
IMPORT_C TTimeMinTime()
IMPORT_C voidSetTimeLocalFloatingL(const TTime &)
IMPORT_C voidSetTimeLocalL(const TTime &)
IMPORT_C voidSetTimeUtcL(const TTime &)
IMPORT_C TTimeTimeLocalL()
IMPORT_C TTimeModeTimeMode()
IMPORT_C TTimeTimeUtcL()

Detailed Description

Represents a date/time, as used in the Calendar API.

This stores a single TTime, which may be set in UTC or local or floating local time, and can be retrieved in either UTC or system local time.

There are references to null time throughout the Interim API - this means Time::NullTTime().

Member Enumeration Documentation

Enum TTimeMode

The time mode for a calendar time

EnumeratorValueDescription
EFloating

Floating time.

EFixedUtc

Fixed time in UTC format.

EFixedTimeZone

Fixed time in local time with time zone reference format.

Constructor & Destructor Documentation

TCalTime ( )

IMPORT_CTCalTime()

Constructor for the TCalTime class. The time is initialised to Time::NullTTime().

capability
None

Member Function Documentation

MaxTime ( )

IMPORT_C TTimeMaxTime()[static]

Get the maximum time allowed in the Interim API. Note that this time is the same for UTC and system local time - it can't be converted.

capability
None

Returns: The maximum time.

MinTime ( )

IMPORT_C TTimeMinTime()[static]

Get the minimum time allowed in the Interim API. Note that this time is the same for UTC and system local time - it can't be converted.

capability
None

Returns: The minimum time.

SetTimeLocalFloatingL ( const TTime & )

IMPORT_C voidSetTimeLocalFloatingL(const TTime &aLocalTime)

Sets the time to a local floating time value. Time values set using this API are said to be "floating" and are not bound to any time zone in particular. Floating time is used to represent the same time regardless of which time zone it is currently being observed from. This is described in RFC2445 as FORM #1: DATE WITH LOCAL TIME.

capability
None
leave
KErrArgument If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
ParameterDescription
aLocalTimeThe time to be set in floating local time.

SetTimeLocalL ( const TTime & )

IMPORT_C voidSetTimeLocalL(const TTime &aLocalTime)

Sets the time to a local time value bound to the current system time zone. Time values set using this API are said to be "fixed". The local time can be converted to an equivalent local time in any other time zone by calling TimeUtcL() and then converting the UTC time to the equivalent local time zone using RTz. This is described in RFC2445 as FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE.

capability
None
leave
KErrArgument If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
ParameterDescription
aLocalTimeThe time to be set in system-local time.

SetTimeUtcL ( const TTime & )

IMPORT_C voidSetTimeUtcL(const TTime &aUtcTime)

Sets the time to a UTC value. Time values set using this API are said to be "fixed". Fixed times in UTC format can be converted to the equivalent local time in any time zone using RTz, or converted to the local time of the current system time zone by calling TimeLocalL(). This is described in RFC2445 as FORM #2: DATE WITH UTC TIME.

capability
None
leave
KErrArgument If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
ParameterDescription
aUtcTimeThe time to be set in UTC.

TimeLocalL ( )

IMPORT_C TTimeTimeLocalL()const

Returns the fixed or floating time as local time. If the time is fixed, the time is converted to the local time of the current system time zone before being returned.

capability
None

Returns: The time in system-local time.

TimeMode ( )

IMPORT_C TTimeModeTimeMode()const

Returns the time mode that the time has been set to, whether it be floating local time, fixed UTC time, or fixed local time.

Returns: Time mode of the calendar time

TimeUtcL ( )

IMPORT_C TTimeTimeUtcL()const

Returns the fixed or floating time as UTC.

capability
None

Returns: The time in UTC.