
Surely many people noticed problems with the readings of the built-in watches. Someone may have noticed the oddities with the display of time related to SMS. This is especially noticeable immediately after the days when in many countries there is a transition to winter or summer time.
To understand how it all works, you will need to dig a little into the architecture. Let's try to figure out why such problems may arise, what affects the time reading, and what can be done if the phone suddenly started to show the wrong time.
')
Zone time
About what geographic and administrative “time zones”, or “time zones,” as it is now called in the Federal Law No. 107-FZ of 2011 “On the calculation of time”, I will not tell, because it is in Wiki.
From this basic information, it is important to remember that the difference in the zone time from the “universal” (UTC) (in everyday life equivalent to “Greenwich” - GMT) is the result of purely administrative actions of the authorities. What is the difference for a particular locality authorities will appoint, so it will be. We will try to first understand the functions of processing time in the network equipment.
Time and SMS
The text message sent from the phone (SMS-SUBMIT) does not provide a place for time information at all.
Only when the message arrives at the SMS center does it acquire the time stamp field - TP-Service-Center-Time-Stamp (TP-SCTS), consisting of 7 octets with rearranged semi-octets (GSM 03.40, TS 23.040) and present the information in binary - a decimal code (BCD), that is, each half-octet encodes one digit.
The first 6 octets represent the year, month, day, hour, minutes, and seconds of the sender's local time.
The seventh octet contains information about the time zone, and indicates the difference between local time and UTC (GMT). The unit of measurement of the time difference is the 15-minute interval, and the third bit (the highest in the right half octte) indicates the algebraic sign of the difference (“0” is positive, “1” is negative).
"Summer time" should be taken into account in the value of information about the time zone. For example, in the UK, the octet value of the time zone is 00000000b (UTC + 00: 00) during the winter time, and 01000000b (4 x 15 minutes, that is, UTC + 01: 00) during the summer time period.
In the structure of a short message delivered to the recipient's phone (SMS-DELIVER), information about the time of arrival of the message to the SMS center is already present, and can be used by the phone when the information about the message is displayed to the user.
What information about the current time the mobile network can communicate to the phone
In 1996, in the GSM specifications (GSM 02.42, 04.08, etc.), tools appeared that allow cellular operators to deliver date, time, and time zone information to their phones. For this purpose, in the signal messages intended for mobility management (Mobility Management), several information elements are provided that can be used by the operator at their discretion, since they are optional.
First of all, this is the information element
"Time Zone and Time" IE . It contains the whole complex of data (year, month, day, hour, minutes and seconds) indicating the moment when the network transmits a signal message, as well as a value indicating the time zone in which the base station is located.
Values ​​of year, month, day, hour, minutes and seconds, as in the case of SMS, are transmitted in BCD encoding with permutation of semi-octets, but, unlike the time center of the SMS center, indicate universal time (UTC), and not local time!
The part of the information element indicating the time zone is transmitted in the same encoding as in the case of the time center of the SMS center.
Here is the block of information transmitted to the phone at a specific point in time:
Octet value / interpretation47 , , 7 IE «Time Zone and Time»
11 YEAR: 11
20 MONTH: 02
71 DAY: 17
70 HOUR: 07
71 MINUTE: 17
30 SECOND: 03
21 TIME ZONE: 12 = GMT+03:00
49 , , IE «Daylight Saving Time»
01 IE «Daylight Saving Time» = 1
00 , - « »
Since in this information element the network transmits the value of “universal time” - UTC, in order for the phone to display local time, it must adjust UTC to the value corresponding to the time shift in the time zone in which the phone is located. In this particular case, the case took place in Moscow, before the adoption of the law “On the calculation of time” and the abolition of the transition to winter time.
Thus, the time transmitted by the network corresponded to 10 hours 17 minutes and 3 seconds in the morning of Moscow time on February 17, 2011. For comparison, a block of information transmitted to the phone recently:
Octet value / interpretation47 , , 7 IE «Time Zone and Time»
21 YEAR: 12
40 MONTH: 04
81 DAY: 18
80 HOUR: 08
45 MINUTE: 54
44 SECOND: 44
61 TIME ZONE: 16 = GMT+04:00
49 , , IE «Daylight Saving Time»
01 IE «Daylight Saving Time» = 1
00 , - « »
12:54:44 18 2012 .
In addition to the information element “Time Zone and Time”, the specifications also provide a separate 8-bit information element intended to transmit information only about the time zone (
“Time Zone” IE ).
The information in it is encoded in the same way as the value of the time zone in the mark of the SMS center.
However, there is little point in transmitting “Time Zone” together with “Time Zone and Time”.
A separate information element (
“Daylight Saving Time” IE ) is also provided, which, if transmitted, indicates the time shift value caused by the use of “summer time”, which was taken into account when calculating the value of the time zone field.
A specific value may indicate the absence of a shift (“00b”), a shift of +1 hour (“01b”), and a shift of even +2 hours (“10b”).
According to the GSM / 3GPP specifications, the time information should be delivered to the mobile phone at the earliest opportunity when the phone is registered on the network, the time zone changes, or the transition to summer or winter time is made.
Thus, using the means described above, the network can supply the phones with all the information necessary to correctly set and display the current time, as well as the time associated with short messages.
But, according to the provisions of the standards, the use of this information is assumed solely
at the discretion of the phone manufacturer .
However, users may experience some problems for reasons that are completely or partially independent of the phones and their manufacturers.
For example, an SMS center serving several time zones must take into account the time at the location of the sending phone. Otherwise, the time of sending the SMS will be recorded with an error equal to the time difference in the time zones where the SMS center and the sender's phone are located. In the zones located near the borders of the time zones, the operator must ensure that the base stations transmit the value of the time zone in whose territory the base stations are located. Of course, operators take these features into account when planning and setting up a network.
However, due to the laws of radio wave propagation, operators cannot fully guarantee the correctness of time information delivered to the phone. After all, a phone located near the administrative boundary of the time zones can receive signals and use information about the date and time from base stations located in the neighboring time zone and transmitting the relevant information.
For the same reason, the SMS center may incorrectly determine the time zone where the phone is actually located if the SMS transmission occurred through the base station located in the neighboring time zone.
In addition, short-term problems are potentially possible due to the fact that the software of network equipment and SMS-centers will automatically switch to summer / winter time in spite of new Russian realities, or it was incorrectly configured at the time of commissioning. But such "nuances" are usually quickly corrected by service personnel.
Other sources of information about time and place
There are other channels for the delivery of information about the date, time and place of stay in mobile phones.
Many phones have the functionality of navigators and can use information about time and location from positioning systems (GPS, GLONASS, etc.).
Phones (tablets) connected to the Internet can use additional time information using NTP or SNTP, as well as information about the location of the "binding" of public IP addresses.
Along with the manual settings of time and time zone, such an abundance of source information in some cases can cause problems for the phone with a choice - which information about time and location to use.
How phones use time information
In the phones, the watches first appeared in a fairly simple configuration - they simply showed the time on the display. In case of moving or changing the time to summer or winter time, it was enough just to translate the clock in accordance with the new realities.
Naturally, the ability to manually set the date and time parameters in the phones is still available.
In manual configuration, the user enters the current date, time and location (time zone) and is responsible for the correctness of the entered information.
It would seem simple and straightforward?
But also in the manual configuration option, problems may arise if the phone software is set to incorrectly match the time zone and city that the user has indicated as his location.
If you use the wrong value for the time zone, later, when you move to another city / country and the corresponding change in the value of the time zone, you can find that the time on the phone is different from the real administrative time in a new place.
As the performance of processors and the capacity of memory elements increased, more complex functions related to time, dates, and the calendar began to be built into the phones.
And now the situation with the automatic mode of setting the date and time looks much more interesting.
If the GSM / UMTS mobile communications network in which the phone is registered does not transmit information about the current date and time, the phone would seem to display the data that the user entered in manual mode, despite the fact that the automatic mode is set. However, it cannot be completely ruled out that developers of some models can use information from positioning systems or from the Internet.
In cases where the operator in the signaling traffic transmits information about the date, time, and time zone, the most logical way out would be to use this particular information — to display the local time calculated from the UTC values ​​and the time zone shift received from the operator.
However, in practice, some manufacturers (their software developers) began to take not always a reasonable initiative in attracting other sources of information. For example, it was noticed that in the automatic time correction mode, for some reason, some models, instead of information about the time zone transmitted by the network, use the value set by the user in the manual setting mode!
Due to the change of time zones in the Russian Federation under the Federal Law No. 107-FZ of 2011 “On the calculation of time”, in phones whose software was developed earlier, data on the time zones of many Russian cities have now become incorrect. As a result, if such a phone, instead of information about the time zone received from the network, uses the value set in the manual settings, the time may be incorrectly displayed.
It is obvious that the correction of such errors should be handled by the phone manufacturer, who is responsible for standards for using the information received from the operator.
However, in conditions of tough competition, manufacturers, seeking to ensure the release of more and more new models, rather quickly stop making changes to the software of previously released models.
In such cases, the manual setting of the time zone value, adjusted in accordance with the above Federal Law, can help.
For example, for Moscow you can set not the old value UTC + 03: 00, but UTC + 04: 00, not paying attention to the name of the city (for example, Baku, Yerevan or Tbilisi).
With regard to older phones, the time may be incorrectly displayed, because they interpret the time value received from the network as local time, not universal time. Obviously, in this case only the manufacturer could correct the problem by developing a new version of the software. Truth and it is difficult to hope.
Known and problems in some models with the interpretation of the time of sending SMS. The receiving phone receives in SMS information about the local time and time zone in which the sending phone was located on the one hand, as well as the network UTC values ​​and time zone at the place where the SMS was received.
Further, the receiving phone can do everything that the manufacturer intended with this information - how it will process all this information before showing to the owner, the standards were attributed solely to the area of ​​responsibility of the phone manufacturer.
Unfortunately, the software developers of some models made mistakes in processing the parameters for sending SMS, and mislead the user.
Without pretending to a comprehensive description of all possible problems with the display of time, I tried to describe the mechanisms, knowledge of which can help to understand the causes of the problem in a particular case and find an acceptable solution.