#include <mw/tzconverter.h>
class CTzConverter : public CBase |
Public Member Functions | |
---|---|
~CTzConverter() | |
IMPORT_C TInt | ConvertToLocalTime(TTime &) |
IMPORT_C TInt | ConvertToLocalTime(TTime &, const CTzId &) |
IMPORT_C TInt | ConvertToUniversalTime(TTime &) |
IMPORT_C TInt | ConvertToUniversalTime(TTime &, const CTzId &) |
IMPORT_C TUint16 | CurrentTzId() |
IMPORT_C CTzConverter * | NewL(RTz &) |
void | NotifyTimeZoneChangeL(RTz::TTzChanges) |
const RTz & | Server() |
Converts a time from UTC to local (wall-clock) time for the current system time zone.
Parameter | Description |
---|---|
aTime | On entry, contains the UTC time to be converted and the converted value on exit. |
Returns: KErrNone if successful, otherwise another system error code.
Converts a time from UTC to the local (wall-clock) time for the specified time zone.
Parameter | Description |
---|---|
aTime | On entry, contains the UTC time to be converted, and the converted value on exit. |
aZone | Time zone ID. |
Returns: KErrNone if successful, otherwise another system error code.
Converts a local (wall-clock) time for the current system time zone into UTC.
Parameter | Description |
---|---|
aTime | On entry, contains the local time to be converted, and the converted value on exit. |
Returns: KErrNone if successful, otherwise another system error code.
Converts a local (wall-clock) time for the specified time zone into UTC.
Parameter | Description |
---|---|
aTime | On entry, contains the local time to be converted, and the converted value on exit. |
aZone | The time zone ID. |
Returns: KErrNone if successful, otherwise another system error code.
IMPORT_C TUint16 | CurrentTzId | ( | ) |
Get the numerical ID of the current time zone.
Returns: The time zone ID.
IMPORT_C CTzConverter * | NewL | ( | RTz & | aTzServer | ) | [static] |
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.
Parameter | Description |
---|---|
aTzServer | Connection to the time zone server. |
Returns: A pointer to the new CTzConverter object. The caller takes ownership.