CTzConverter Class Reference
class CTzConverter : public CBase
|
Converts between time expressed in UTC and local time.
Constructor & Destructor Documentation
CTzConverter(RTz &)
CTzConverter
|
(
|
RTz
&
|
aTzServer
|
)
|
[private]
|
~CTzConverter()
IMPORT_C
|
~CTzConverter
|
(
|
)
|
|
Member Functions Documentation
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
ConvertToLocalTime(TTime &)
IMPORT_C
TInt
|
ConvertToLocalTime
|
(
|
TTime
&
|
aTime
|
)
|
|
Converts a time from UTC to local (wall-clock) time for the current system time zone.
Parameters
TTime
& aTime
|
On entry, contains the UTC time to be converted and the converted value on exit.
|
ConvertToLocalTime(TTime &, const CTzId &)
IMPORT_C
TInt
|
ConvertToLocalTime
|
(
|
TTime
&
|
aTime,
|
|
const
CTzId
&
|
aZone
|
|
)
|
|
Converts a time from UTC to the local (wall-clock) time for the specified time zone.
Parameters
TTime
& aTime
|
On entry, contains the UTC time to be converted, and the converted value on exit.
|
const
CTzId
& aZone
|
Time zone ID.
|
ConvertToUniversalTime(TTime &)
IMPORT_C
TInt
|
ConvertToUniversalTime
|
(
|
TTime
&
|
aTime
|
)
|
|
Converts a local (wall-clock) time for the current system time zone into UTC.
Parameters
TTime
& aTime
|
On entry, contains the local time to be converted, and the converted value on exit.
|
ConvertToUniversalTime(TTime &, const CTzId &)
IMPORT_C
TInt
|
ConvertToUniversalTime
|
(
|
TTime
&
|
aTime,
|
|
const
CTzId
&
|
aZone
|
|
)
|
|
Converts a local (wall-clock) time for the specified time zone into UTC.
Parameters
TTime
& aTime
|
On entry, contains the local time to be converted, and the converted value on exit.
|
const
CTzId
& aZone
|
The time zone ID.
|
CurrentTzId()
Get the numerical ID of the current time zone.
NewL(RTz &)
CTzConverter
factory method.
Provides client side caching for conversions in the local time zone. Caching is done through
RTz
but enabled through this interface. When caching has been enabled by this class and the
RTz
functions for local time zone conversion are used, they too will use the cache instead of the server. Multiple CTzConverter's can use the same
RTz
session. Each converter will be notified by the server if the time zone changes, and the cache will be updated appropriately.
To disable caching in
RTz
, the session must be closed. Caching will be re-enabled if a
CTzConverter
associated with the
RTz
is later used again for local time zone conversions.
This will leave with KErrNotReady if the
RTz
passed in is not connected.
Parameters
RTz
& aTzServer
|
Connection to the time zone server.
|
NotifyTimeZoneChangeL(RTz::TTzChanges)
Server()
const
RTz
&
|
Server
|
(
|
)
|
const
|
Member Data Documentation
TAny * iReserved
TAny
*
|
iReserved
|
[private]
|
TAny * iReserved2
TAny
*
|
iReserved2
|
[private]
|
RTz & iTzServer
RTz
&
|
iTzServer
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.