×
Namespaces

Variants
Actions

Change phone time

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): E90
Compatibility
Platform(s): S60 3rd,3rd FP1,3rd Fp2
Platform Security
Capabilities: )
Article
Keywords: keywords=RTz::SetHomeTime
Created: lming (01 Nov 2008)
Last edited: hamishwillee (24 Jun 2011)

Overview

This snippet demonstrates how to set the phone home time. This snippet needs this capability: WriteDeviceData.

Headers required:

#include <e32std.h>
#include <tz.h>

Library required:

LIBRARY        euser.lib 
LIBRARY tzclient.lib

Capabilities required:

capability         WriteDeviceData

Source file

//KtargetTime will be saved as phone home time
_LIT(KtargetTime,"20081020:103000.00");
TTime targetLocalTime;
targetLocalTime.Set(KtargetTime);
 
//client session of timeZoneServer
RTz timeZoneServer;
User::LeaveIfError(timeZoneServer.Connect());
CleanupClosePushL(timeZoneServer);
 
TInt err = User::SetHomeTime(currentLocalTime);
if(err == KErrNone)
{
//no error happen
//....
}
else
{
//error happens
//....
}
 
//close session
CleanupStack::PopAndDestroy(1);//timeZoneServer
This page was last modified on 24 June 2011, at 11:38.
70 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×