class TCalTime;
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()
.
Members
Defined in TCalTime
:
EFixedTimeZone
Fixed time in local time with time zone reference format.
EFixedUtc
Fixed time in UTC format.
EFloating
Floating time.
MaxTime()
Get the maximum time allowed in the Interim API. Note that this time is the same...
MinTime()
Get the minimum time allowed in the Interim API. Note that this time is the same...
SetTimeLocalFloatingL(const TTime &)
Sets the time to a local floating time value. Time values set using this API are...
SetTimeLocalL(const TTime &)
Sets the time to a local time value bound to the current system time zone. Time ...
SetTimeUtcL(const TTime &)
Sets the time to a UTC value. Time values set using this API are said to be &quo...
TCalTime()
Constructor for the TCalTime class. The time is initialised to Time::NullTTime()...
TTimeMode
The time mode for a calendar time
TimeLocalL()const
Returns the fixed or floating time as local time. If the time is fixed, the time...
TimeMode()const
Returns the time mode that the time has been set to, whether it be floating loca...
TimeUtcL()const
Returns the fixed or floating time as UTC.
Related Topics
»
Symbian OS v9.4 »
Examples »
Application Engines example code »
CalinterimAPI: Using Calendar API
Construction and destruction
IMPORT_C TCalTime();
Description
Constructor for the TCalTime class. The time is initialised to Time::NullTTime()
.
SetTimeLocalFloatingL(const TTime &)
IMPORT_C void SetTimeLocalFloatingL(const TTime &aLocalTime);
Description
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.
Parameters
const TTime &aLocalTime |
The time to be set in floating local time.
|
|
Leave codes
KErrArgument |
If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
|
|
SetTimeUtcL(const TTime &)
IMPORT_C void SetTimeUtcL(const TTime &aUtcTime);
Description
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 TCalTime::TimeLocalL()const
. This is described in RFC2445 as FORM #2: DATE WITH UTC TIME.
Parameters
const TTime &aUtcTime |
The time to be set in UTC.
|
|
Leave codes
KErrArgument |
If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
|
|
SetTimeLocalL(const TTime &)
IMPORT_C void SetTimeLocalL(const TTime &aLocalTime);
Description
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 TCalTime::TimeUtcL()const
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.
Parameters
const TTime &aLocalTime |
The time to be set in system-local time.
|
|
Leave codes
KErrArgument |
If the given time is not null but smaller than TCalTime::MinTime() or bigger than TCalTime::MaxTime()
|
|
IMPORT_C TTimeMode TimeMode() const;
Description
Returns the time mode that the time has been set to, whether it be floating local time, fixed UTC time, or fixed local time.
Return value
IMPORT_C TTime TimeUtcL() const;
Description
Returns the fixed or floating time as UTC.
Return value
IMPORT_C TTime TimeLocalL() const;
Description
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.
Return value
TTime
|
The time in system-local time.
|
|
IMPORT_C static TTime MaxTime();
Description
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.
Return value
IMPORT_C static TTime MinTime();
Description
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.
Return value
TTimeMode
Description
The time mode for a calendar time