Method for time and time zone synchronization and terminal device

A method for time and time zone synchronization and a terminal device. After a terminal registers with a network or roams to the network, the terminal determines whether the network supports a Network Identity and Time Zone (NITZ) function; and if the terminal determines that the network supports the NITZ function, the terminal prompts a user that uses the terminal to use a function of automatic time and time zone synchronization when automatic synchronization is not set for the terminal; or if the terminal determines that the network does not support the NITZ function, the terminal prompts a user that uses the terminal to manually configure time and a time zone. According to the present application, correctness of time and a time zone of the terminal can be ensured.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a National Stage of International Application No. PCT/CN2014/092814, filed on Dec. 2, 2014, which claims priority to Chinese Patent Application No. 201310652904.8, filed on Dec. 5, 2013, both of which are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to communications technologies, and in particular, to a method for time and time zone synchronization and a terminal device.

BACKGROUND

Network time synchronization, or rather, a Network Identity and Time Zone (NITZ) function, means that in the 3rd Generation Partnership Project (3GPP) protocol, a network delivers information such as a network name and/or time and a time zone to a terminal using an Over-The-Air (OTA) message, so as to help the terminal automatically synchronize with network time, date, time zone, daylight saving time, and the like. The OTA message is not mandatory, and whether to deliver the OTA message may be configured on a network side.

A network time synchronization function is supported in Global System for Mobile Communications (GSM) and Wideband Code Division Multiple Access (WCDMA) networks. However, there are still many networks that do not support the network time synchronization function. In addition, the protocol does not specify that signaling of a network and a terminal carries a flag bit indicating whether the network supports the NITZ function. Therefore, the terminal does not know whether the network supports NITZ (or time synchronization), and the terminal cannot determine, according to the network, whether to perform time synchronization.

NITZ information is delivered to a mobile phone by a network using a mobility management message (Moving Management Information or MM INFO) in an OTA message. The message is delivered after the terminal interacts with a core network. For example, the message is delivered after registration is successful, or a location update is successful, or a Short Message Service (SMS) message, a call, packet data protocol (PDP) activation, or PDP deactivation is successful.

In the prior art, in operating systems of some terminals, a setting menu generally provides an option about whether to enable automatic time synchronization. If the automatic time synchronization is enabled, the terminals synchronize with network time using an OTA message delivered by a network. If the network does not support an NITZ function, some terminals complete time and time zone synchronization by accessing a specific server using a data service.

For a current design, if a terminal can use a data service, or a network supports an NITZ function, a mobile phone can synchronize with network time. However, if neither of the two conditions exists, the terminal cannot automatically synchronize with network time and time zone.

In addition, for a method for completing time synchronization using a data service, due to an extremely high fee of a data service used in a roaming scenario, a user generally disables the data service when roaming, and consequently when roaming, the user cannot determine whether to enable an automatic time synchronization function, such that the user still needs to set time, a date, and a time zone manually.

Moreover, in the prior art, because Code Division Multiple Access (CDMA) is a synchronization system, a terminal in a CDMA network synchronizes with time of a base station by default. In addition, in some countries and regions, the terminal in the CDMA network can roam to a GSM network. Therefore, for the terminal in the CDMA network, when the terminal roams to the GSM network, if automatic time and time zone synchronization is not enabled in a setting menu, the terminal does not synchronize with network time, thereby resulting in an error in settings of time and a time zone.

In conclusion, after a terminal registers with or roams to a network, it is possible that the terminal cannot use a function of automatic time and time zone synchronization.

SUMMARY

The present disclosure provides a method for time and time zone synchronization and a terminal device, so as to resolve a problem that after a terminal registers with or roams to a network, it is possible that the terminal cannot use a function of automatic time and time zone synchronization.

According to a first aspect, the present disclosure provides a method for time and time zone synchronization, including, after a terminal registers with a network or roams to the network, determining, by the terminal, whether the network supports a NITZ function; and if the terminal determines that the network supports the NITZ function, prompting, by the terminal when automatic synchronization is not set for the terminal, a user that uses the terminal to use a function of automatic time and time zone synchronization; or if the terminal determines that the network does not support the NITZ function, prompting, by the terminal, a user that uses the terminal to manually configure time and a time zone.

With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining, by the terminal, whether the network supports an NITZ function includes determining, by the terminal according to NITZ information saved by the terminal, whether the network supports the NITZ function, where the NITZ information includes information about whether the network supports the NITZ function.

With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining, by the terminal, whether the network supports an NITZ function further includes monitoring, by the terminal within preset duration, a mobility management message delivered by the network, so as to determine whether the network supports the NITZ function.

With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the monitoring, by the terminal within preset duration, a mobility management message delivered by the network, so as to determine whether the network supports the NITZ function includes, when the terminal receives, within the preset duration, the mobility management message delivered by the network, determining, by the terminal, that the network supports the NITZ function; or when the terminal does not receive, within the preset duration, the mobility management message delivered by the network, determining, by the terminal, that the network does not support the NITZ function.

With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes, after the terminal determines whether the network supports the NITZ function, saving, by the terminal, the information about whether the network supports the NITZ function into an NITZ information table.

According to a second aspect, the present disclosure provides a terminal device, including a determining module configured to, after the terminal device registers with a network or roams to the network, determine whether the network supports a NITZ function; and a prompting module configured to, when the determining module determines that the network supports the NITZ function, and automatic synchronization is not set for the terminal device, prompt a user that uses the terminal device to use a function of automatic time and time zone synchronization; or when the determining module determines that the network does not support the NITZ function, prompt a user that uses the terminal device to manually configure time and a time zone.

With reference to the second aspect, in a first possible implementation manner of the second aspect, the determining module is configured to determine, according to NITZ information saved by the terminal device, whether the network supports the NITZ function, where the NITZ information includes information about whether the network supports the NITZ function.

With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the determining module is further configured to monitor, within preset duration, a mobility management message delivered by the network, so as to determine whether the network supports the NITZ function.

With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the determining module is configured to, when the mobility management message delivered by the network is received within the preset duration, determine that the network supports the NITZ function; or when the mobility management message delivered by the network is not received within the preset duration, determine that the network does not support the NITZ function.

With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the terminal device further includes a saving module configured to, after the determining module determines whether the network supports the NITZ function, save the information about whether the network supports the NITZ function into an NITZ information table.

Technical effects of the present disclosure are as follows: After registering with a network or roaming to the network, a terminal determines whether the network supports an NITZ function; if the terminal determines that the network supports the NITZ function, the terminal prompts, when automatic synchronization is not set for the terminal, a user that uses the terminal to use a function of automatic time and time zone synchronization; or if the terminal determines that the network does not support the NITZ function, the terminal prompts a user that uses the terminal to manually configure time and a time zone. In this way, after the terminal registers with or roams to the network, the user that uses the terminal can be promptly prompted to use the function of automatic time and time zone synchronization or manually configure the time and the time zone, thereby effectively ensuring correctness of the time and the time zone of the terminal.

DESCRIPTION OF EMBODIMENTS

FIG. 1is a flowchart of an embodiment of a method for time and time zone synchronization according to the present disclosure. As shown inFIG. 1, the method for time and time zone synchronization may include the following steps.

Step101: After a terminal registers with a network or roams to the network, the terminal determines whether the network supports an NITZ function.

The terminal determining whether the network supports the NITZ function may be as follows: The terminal determines, according to NITZ information saved by the terminal, whether the network supports the NITZ function, where the NITZ information includes information about whether the network supports the NITZ function.

Further, the terminal may further monitor, within preset duration, a MM INFO delivered by the network, so as to determine whether the network supports the NITZ function.

The terminal monitoring, within the preset duration, the MM INFO delivered by the network, so as to determine whether the network supports the NITZ function may be as follows: When the terminal receives, within the preset duration, the MM INFO delivered by the network, the terminal determines that the network supports the NITZ function; or when the terminal does not receive, within the preset duration, the MM INFO delivered by the network, the terminal determines that the network does not support the NITZ function. During implementation, the preset duration may be manually set according to a performance requirement and an actual need. The preset duration is not limited in this embodiment. For example, the preset duration may be 10 seconds.

Further, in this embodiment, after the terminal determines whether the network supports the NITZ function, the terminal may further save the information about whether the network supports the NITZ function into an NITZ information table.

Step102: If the terminal determines that the network supports the NITZ function, the terminal prompts, when automatic synchronization is not set for the terminal, a user that uses the terminal to use a function of automatic time and time zone synchronization; or if the terminal determines that the network does not support the NITZ function, the terminal prompts a user that uses the terminal to manually configure time and a time zone.

In the foregoing embodiment, after registering with or roaming to a network, a terminal determines whether the network supports an NITZ function; if the terminal determines that the network supports the NITZ function, the terminal prompts, when automatic synchronization is not set for the terminal, a user that uses the terminal to use a function of automatic time and time zone synchronization; or if the terminal determines that the network does not support the NITZ function, the terminal prompts a user that uses the terminal to manually configure time and a time zone. In this way, after the terminal registers with or roams to the network, the user that uses the terminal can be promptly prompted to use the function of automatic time and time zone synchronization or manually configure the time and the time zone, thereby effectively ensuring correctness of the time and the time zone of the terminal.

FIG. 2is a flowchart of an embodiment in which a terminal determines whether a network supports an NITZ function according to the present disclosure. This embodiment describes a process in which, after registering with or roaming to a first network, the terminal determines whether the first network supports the NITZ function. As shown inFIG. 2, the process may include the following steps.

Step201: The terminal searches, in NITZ information saved by the terminal, NITZ information corresponding to the first network.

Step202: The terminal determines whether the NITZ information corresponding to the first network is found, where if the NITZ information corresponding to the first network is found, step203is performed; or if the NITZ information corresponding to the first network is not found, step204is performed.

The NITZ information corresponding to the first network is used to indicate whether the first network supports the NITZ function.

That is, if the terminal can find the NITZ information corresponding to the first network, step203is performed. However, if the terminal cannot find the NITZ information corresponding to the first network, step204is performed, and whether the first network supports the NITZ function is determined by monitoring MM INFO.

Step203: The terminal determines, according to the NITZ information corresponding to the first network, whether the first network supports the NITZ function.

More specifically, if the NITZ information corresponding to the first network indicates that the first network does not support the NITZ function, the terminal may determine that the first network does not support the NITZ function; or if the NITZ information corresponding to the first network indicates that the first network supports the NITZ function, the terminal may determine that the first network supports the NITZ function.

Step204: The terminal determines whether the terminal receives, within preset duration, a mobility management message delivered by the first network, where if the terminal receives, within the preset duration, the mobility management message delivered by the first network, step205is performed; or if the terminal does not receive, within the preset duration, the mobility management message delivered by the first network, step206is performed.

During implementation, the preset duration may be manually set according to a performance requirement and an actual need. The preset duration is not limited in this embodiment. For example, the preset duration may be 10 seconds.

Step205: The terminal determines that the first network supports the NITZ function.

Step206: The terminal determines that the first network does not support the NITZ function.

Further, after the terminal determines whether the first network supports the NITZ function (that is, step205or step206), the terminal saves information about whether the first network supports the NITZ function as the NITZ information corresponding to the first network. The terminal may save the information about whether the first network supports the NITZ function into an NITZ information table.

Because how soon the mobility management message of the network is sent after the terminal registers successfully is uncertain, there may be a delay in determining, by monitoring the mobility management message, whether the network supports the NITZ function. In addition, a possibility that the network does not deliver the mobility management message until a timer expires is not excluded, or it is possible that, due to a network configuration error or a network reason, the terminal does not receive the mobility management message during registration, and consequently, determining whether the network supports the NITZ function is inaccurate.

Therefore, in this embodiment, further, when the terminal does not receive, within the preset duration, the MM INFO delivered by the first network, the terminal determines that the first network does not support the NITZ function (that is, step206); afterward, in the first network, after the preset duration expires and before the terminal powers off, if the terminal receives the MM INFO delivered by the first network, the terminal determines that the first network supports the NITZ function, and updates the NITZ information that is corresponding to the first network and is saved by the terminal to information that the first network supports the NITZ function; or in the first network, if the terminal does not receive, from beginning to end, the mobility management message delivered by the first network, and the terminal receives, when the terminal returns to the first network after the terminal registers with a second network other than the first network, the MM INFO delivered by the first network, the terminal determines that the first network supports the NITZ function, and updates the NITZ information that is corresponding to the first network and is saved by the terminal to information that the first network supports the NITZ function.

The terminal may locally maintain a list, for example, an NITZ information table, so as to record and maintain NITZ information corresponding to a network. A format of the NITZ information table may be as shown in Table 1. Table 1 is merely an example of the NITZ information table. The format of the NITZ information table is not limited in the present disclosure as long as the NITZ information table records and maintains the NITZ information corresponding to the network.

TABLE 1FieldDescriptionPublic Land Mobile Network (PLMN)Network IDTypeGSM or WCDMANITZSupport NITZ or not

For example, it is assumed that, using the method provided in this embodiment of the present disclosure, the terminal determines that a GSM network of which a network ID is “46001” does not support an NITZ function, and the terminal does not save NITZ information corresponding to the GSM network of which the network ID is “46001”. Then, the terminal adds, into Table 1, the NITZ information corresponding to the GSM network of which the network ID is “46001”, as shown in Table 2.

TABLE 2FieldDescriptionPLMN46001TypeGSMNITZNot supported

However, afterward, in the GSM network of which the network ID is “46001”, if the terminal does not receive MM INFO within preset duration, but the terminal receives the MM INFO after the preset duration expires, the terminal may determine that the GSM network of which the network ID is “46001” supports the NITZ function, and in this case, the terminal may update the NITZ information corresponding to the GSM network of which the network ID is “46001” to information that the GSM network of which the network ID is “46001” supports the NITZ function, as shown in Table 3; or in the GSM network of which the network ID is “46001”, if the terminal does not receive MM INFO from beginning to end, and the terminal receives, when the terminal returns to the GSM network of which the network ID is “46001” after the terminal registers with a second network other than the GSM network of which the network ID is “46001”, the MM INFO delivered by the GSM network of which the network ID is “46001”, the terminal may determine that the GSM network of which the network ID is “46001” supports the NITZ function, and in this case, the terminal updates the NITZ information corresponding to the GSM network of which the network ID is “46001” to information that the GSM network of which the network ID is “46001” supports the NITZ function, as shown in Table 3.

In addition, in the GSM network of which the network ID is “46001”, if the terminal does not receive the MM INFO from beginning to end, but as the terminal roams to the second network other than the GSM network of which the network ID is “46001”, the terminal receives MM INFO delivered by the second network, the terminal may determine that the second network supports an NITZ function. In this case, the terminal may update NITZ information corresponding to the second network to information that the second network supports the NITZ function.

In the present disclosure, after registering with or roaming to a first network, a terminal determines whether the first network supports an NITZ function; if the terminal determines that the first network supports the NITZ function, the terminal prompts, when automatic synchronization is not set for the terminal, a user that uses the terminal to use a function of automatic time and time zone synchronization; or if the terminal determines that the first network does not support the NITZ function, the terminal prompts a user that uses the terminal to manually configure time and a time zone. In this way, after the terminal registers with or roams to the network, the user that uses the terminal can be promptly prompted to use the function of automatic time and time zone synchronization or manually configure the time and the time zone, thereby effectively ensuring correctness of the time and the time zone of the terminal.

FIG. 3is a schematic structural diagram of an embodiment of a terminal device according to the present disclosure. The terminal device in this embodiment can implement a procedure of the embodiment shown inFIG. 1of the present disclosure. As shown inFIG. 3, the terminal device may include a determining module31and a prompting module32.

The determining module31is configured to, after the terminal device registers with a network or roams to the network, determine whether the network supports an NITZ function.

The prompting module32is configured to, when the determining module31determines that the network supports the NITZ function, and automatic synchronization is not set for the terminal device, prompt a user that uses the terminal device to use a function of automatic time and time zone synchronization; or when the determining module31determines that the network does not support the NITZ function, prompt a user that uses the terminal device to manually configure time and a time zone.

In this embodiment, the determining module31is configured to determine, according to NITZ information saved by the terminal device, whether the network supports the NITZ function, where the NITZ information includes information about whether the network supports the NITZ function. Further, the determining module31is further configured to monitor, within preset duration, MM INFO delivered by the network, so as to determine whether the network supports the NITZ function.

During implementation, the preset duration may be manually set according to a performance requirement and an actual need. The preset duration is not limited in this embodiment. For example, the preset duration may be 10 seconds.

The determining module31being further configured to monitor, within the preset duration, the MM INFO delivered by the network, so as to determine whether the network supports the NITZ function may be as follows: When the MM INFO delivered by the network is received within the preset duration, the determining module31determines that the network supports the NITZ function; or when the MM INFO delivered by the network is not received within the preset duration, determines that the network does not support the NITZ function.

According to the foregoing terminal device, after the terminal device registers with or roams to a network, a determining module31determines whether the network supports an NITZ function; if the determining module31determines that the network supports the NITZ function, a prompting module32prompts, when automatic synchronization is not set for the terminal device, a user that uses the terminal device to use a function of automatic time and time zone synchronization; or if the determining module31determines that the network does not support the NITZ function, the prompting module32prompts a user that uses the terminal device to manually configure time and a time zone. In this way, after the terminal device registers with or roams to the network, the user that uses the terminal device can be promptly prompted to use the function of automatic time and time zone synchronization or manually configure the time and the time zone, thereby effectively ensuring correctness of the time and the time zone of the terminal.

FIG. 4is a schematic structural diagram of another embodiment of a terminal device according to the present disclosure. A difference from the terminal device shown inFIG. 3lies in that the terminal device shown inFIG. 4may further include a saving module33.

The saving module33is configured to, after the determining module31determines whether the network supports the NITZ function, save the information about whether the network supports the NITZ function into an NITZ information table.

More specifically, in the terminal device, an embodiment in which the determining module31determines whether the network supports the NITZ function may be as follows: The determining module31searches, in NITZ information saved by the terminal device, NITZ information corresponding to the network. The NITZ information corresponding to the network is used to indicate whether the network supports the NITZ function. If the NITZ information corresponding to the network is found, the determining module31may determine, according to the found NITZ information corresponding to the network, whether the network supports the NITZ function; or if the NITZ information corresponding to the network is not found, the determining module31may further determine whether the terminal receives, within the preset duration, the MM INFO delivered by the network. If it is determined that the terminal receives, within the preset duration, the MM INFO delivered by the network, the determining module31may determine that the network supports the NITZ function; or if it is determined that the terminal does not receive, within the preset duration, the MM INFO delivered by the network, the determining module31may determine that the network does not support the NITZ function.

Further, after the determining module31determines whether the network supports the NITZ function, the saving module33may save the information about whether the network supports the NITZ function as the NITZ information corresponding to the network. The saving module33may save the information about whether the network supports the NITZ function into the NITZ information table. In this embodiment, a format of the NITZ information table may be as shown in Table 1, and details are not repeatedly described herein.

Because how soon a mobility management message of the network is sent after the terminal device registers successfully is uncertain, there may be a delay in determining, by the determining module31by monitoring the MM INFO, whether the network supports the NITZ function. In addition, a possibility that the network does not deliver the MM INFO until a timer expires is not excluded, or it is possible that due to a network configuration error or a network reason, the terminal does not receive the MM INFO during registration, and consequently, determining, by the determining module31, whether the network supports the NITZ function is inaccurate.

Therefore, in this embodiment, further, when the terminal device does not receive, within the preset duration, the MM INFO delivered by the network (for example, a first network), the determining module31determines that the first network does not support an NITZ function; afterward, in the first network, after the preset duration expires and before the terminal device powers off, if the terminal device receives the MM INFO delivered by the first network, the determining module31determines that the first network supports the NITZ function, and the saving module33updates saved NITZ information corresponding to the first network to information that the first network supports the NITZ function; or in the first network, if the terminal device does not receive, from beginning to end, the MM INFO delivered by the first network, and the terminal device receives, when the terminal device returns to the first network after the terminal device registers with a second network other than the first network, the MM INFO delivered by the first network, the determining module31determines that the first network supports the NITZ function, and the saving module33updates the saved NITZ information corresponding to the first network to information that the first network supports the NITZ function.

For an example in which the saving module33adds, into the NITZ information table, the NITZ information corresponding to the first network, refer to Table 2; and for an example in which the saving module33updates, in the NITZ information table, the NITZ information corresponding to the first network, refer to Table 3. Details are not repeatedly described herein.

According to the foregoing terminal device, after the terminal device registers with or roams to a network, a user that uses the terminal device can be promptly prompted to use a function of automatic time and time zone synchronization or manually configure time and a time zone, thereby effectively ensuring correctness of time and a time zone of the terminal.

FIG. 5is a schematic structural diagram of still another embodiment of a terminal device according to the present disclosure. The terminal device in this embodiment can implement a procedure of the embodiment shown inFIG. 1of the present disclosure. As shown inFIG. 5, the terminal device may include a receiver51, a transmitter52, a memory53, and a processor54that is connected to all of the receiver51, the transmitter52, and the memory53. The terminal device may further include general-purpose components, such as an antenna, a baseband processing component, and an input/output component, and details are not described herein.

The memory53is configured to store program code.

The processor54is configured to invoke the program code stored in the memory53, so as to, after the terminal device registers with a network or roams to the network, determine whether the network supports an NITZ function; if it is determined that the network supports the NITZ function, prompt, when automatic synchronization is not set for the terminal device, a user that uses the terminal device to use a function of automatic time and time zone synchronization; or if it is determined that the network does not support the NITZ function, prompt a user that uses the terminal device to manually configure time and a time zone.

In this embodiment, the processor54is configured to determine, according to NITZ information saved by the terminal device, whether the network supports the NITZ function, where the NITZ information includes information about whether the network supports the NITZ function. Further, the processor54is further configured to monitor, within preset duration, MM INFO delivered by the network, so as to determine whether the network supports the NITZ function.

During implementation, the preset duration may be manually set according to a performance requirement and an actual need. The preset duration is not limited in this embodiment, for example, the preset duration may be 10 seconds.

The processor54being further configured to monitor, within the preset duration, the MM INFO delivered by the network, so as to determine whether the network supports the NITZ function may be as follows: When the receiver51receives, within the preset duration, the MM INFO delivered by the network, the processor54determines that the network supports the NITZ function; or when the receiver51does not receive, within the preset duration, the MM INFO delivered by the network, the processor54determines that the network does not support the NITZ function.

Further, the processor54is further configured to, after determining whether the network supports the NITZ function, save the information about whether the network supports the NITZ function into an NITZ information table.

More specifically, in the terminal device, an embodiment in which the processor54determines whether the network supports the NITZ function may be as follows: The processor54searches, in the NITZ information saved by the terminal device, NITZ information corresponding to the network. The NITZ information corresponding to the network is used to indicate whether the network supports the NITZ function. If the NITZ information corresponding to the network is found, the processor54may determine, according to the found NITZ information corresponding to the network, whether the network supports the NITZ function; or if the NITZ information corresponding to the network is not found, the processor54may further determine whether the receiver51receives, within the preset duration, the MM INFO delivered by the network. If it is determined that the receiver51receives, within the preset duration, the MM INFO delivered by the network, the processor54may determine that the network supports the NITZ function; or if it is determined that the receiver51does not receive, within the preset duration, the MM INFO delivered by the network, the processor54may determine that the network does not support the NITZ function.

Further, after determining whether the network supports the NITZ function, the processor54may save the information about whether the network supports the NITZ function as the NITZ information corresponding to the network. The processor54may save the information about whether the network supports the NITZ function into the NITZ information table. In this embodiment, a format of the NITZ information table may be as shown in Table 1, and details are not repeatedly described herein.

Because how soon a mobility management message of the network is sent after the terminal device registers successfully is uncertain, there may be a delay in determining, by the processor54by monitoring the MM INFO, whether the network supports the NITZ function. In addition, a possibility that the network does not deliver the MM INFO until a timer expires is not excluded, or it is possible that due to a network configuration error or a network reason, the receiver51does not receive the MM INFO during registration, and consequently, determining, by the processor54, whether the network supports the NITZ function is inaccurate.

Therefore, in this embodiment, further, when the receiver51does not receive, within the preset duration, the MM INFO delivered by the network (for example, a first network), the processor54determines that the first network does not support an NITZ function; afterward, in the first network, after the preset duration expires and before the terminal device powers off, if the receiver51receives the MM INFO delivered by the first network, the processor54determines that the first network supports the NITZ function, and updates saved NITZ information corresponding to the first network to information that the first network supports the NITZ function; or in the first network, if the receiver51does not receive, from beginning to end, the MM INFO delivered by the first network, and the receiver51receives, when the terminal device reruns to the first network after the terminal device registers with a second network other than the first network, the MM INFO delivered by the first network, the processor54determines that the first network supports the NITZ function, and updates the saved NITZ information corresponding to the first network to information that the first network supports the NITZ function.

For an example in which the processor54adds, into the NITZ information table, the NITZ information corresponding to the first network, refer to Table 2; and for an example in which the processor54updates, in the NITZ information table, the NITZ information corresponding to the first network, refer to Table 3. Details are not repeatedly described herein.

According to the foregoing terminal device, after the terminal device registers with a first network or roams to a first network, a processor54determines whether the first network supports an NITZ function; if it is determined that the first network supports the NITZ function, the processor54prompts, when automatic synchronization is not set for the terminal device, a user that uses the terminal device to use a function of automatic time and time zone synchronization; or if it is determined that the first network does not support the NITZ function, the processor54prompts a user that uses the terminal device to manually configure time and a time zone. In this way, after the terminal device registers with or roams to the network, the user that uses the terminal device can be promptly prompted to use the function of automatic time and time zone synchronization or manually configure the time and the time zone, thereby effectively ensuring correctness of the time and the time zone of the terminal.

Persons skilled in the art may understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and modules or procedures in the accompanying drawings are not necessarily required for implementing the present disclosure.

Persons skilled in the art may understand that the modules in the apparatuses in the embodiments may be arranged in the apparatuses in the embodiments in a distributed manner according to the description of the embodiments, or may be arranged in one or more apparatuses that are different from those described in the embodiments. The modules in the foregoing embodiments may be combined into one module, or split into multiple submodules.