diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-CC05C1AA-02B0-5E94-9522-44BCF44CBA48.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-CC05C1AA-02B0-5E94-9522-44BCF44CBA48.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,20 @@ + + + + + +Network Date and Time TutorialThis tutorial describes how to retrieve the date and the time from the network. To get the network date and time settings, use RMobilePhone::GetNITZInfo(). This returns a RMobilePhone::TMobilePhoneNITZ object, derived from TDateTime. The iNitzFieldsUsed member, of type RMobilePhone::TMobilePhoneNITZCaps, describes what fields are available. To get the notification of any changes to the type of time information available, use RMobilePhone::NotifyNITZInfoChange(). Date and time example

The following code checks if time information is available, and if so, stores the day information in the variable day.

The code assumes iMobilePhone is an RMobilePhone object.

RMobilePhone::TMobilePhoneNITZ NITZInfo; +User::LeaveIfError(iMobilePhone.GetNITZInfo(NITZInfo)); +TInt day = -1; + +if (NITZInfo.iNitzFieldsUsed & RMobilePhone::KCapsTimeAvailable) + { + day = NITZInfo.Day(); + } +
\ No newline at end of file