[HTML payload içeriği buraya]
33.1 C
Jakarta
Monday, May 11, 2026

Higher, quicker, stronger time zone updates on Android



Posted by Almaz Mingaleev – Software program Engineer and Masha Khokhlova – Technical Program Supervisor

It is that point of yr once more when many people transfer our clocks! Oh wait, your Android units did it robotically, didn’t they? For Android customers residing in lots of nations, this is probably not shocking. For instance, the US, EU and UK governments have not modified their time laws shortly*, so customers get up each morning to see the proper time.

However, what occurs when time legal guidelines change? If you happen to look globally, governments can and do change their time legal guidelines, typically yearly, and Android units should hold as much as assist our international person base.

To implement a area’s time laws, Android units should observe a set of encoded guidelines. What are these guidelines? Let’s begin with why guidelines are wanted within the first place. Clearly, 7am in Los Angeles and 7am in London aren’t the identical time. Furthermore, if you’re in London and wish to know the time in Los Angeles, it’s a must to know what number of hours to subtract, and this isn’t mounted all year long**. So to inform native time (time your watches ought to present) it’s handy to have a reference clock that everyone on the planet agrees on. This clock is known as UTC, coordinated common time. Native time in London throughout winter matches UTC, throughout summer season it’s calculated by including one hour to UTC, often known as UTC+1. For Los Angeles native time throughout summer season is UTC-8 (8 hours behind, UTC offset is -8 hours) and through winter it’s UTC-7 correspondingly. When a area modifications from one offset to a different, we name {that a} “transition”. Mixture of those offsets and guidelines when a transition occurs (akin to “final Sunday of March” or “first Sunday on or after eighth March”) defines a time zone. For some nations, the time zone guidelines could be quite simple and primarily decided by their chosen UTC offset: “no transitions, we don’t transfer our clocks forwards and backwards”.

Governments can resolve to alter the UTC offset for areas, introduce new time zone areas, or alter the day that daylight saving transitions happen. When governments do that, the time zone guidelines on each Android machine must be up to date, in any other case the Android machine will proceed to observe the previous guidelines, which may result in an incorrect native time being proven to customers within the affected areas.

Android shouldn’t be alone in needing to maintain monitor of this data. Thankfully, there’s a database supported by IANA (Web Assigned Numbers Authority) and maintained by a small group of volunteers referred to as the TZDB (Time Zone Database) which is used as a foundation for native timekeeping on most fashionable working methods. The TZDB incorporates many of the data that Android wants.

There isn’t any schedule, however sometimes the TZDB releases a brand new replace 4-5 occasions a yr. The Android group desires to launch updates that have an effect on its units as quickly as attainable.

How do these modifications attain your units?

    1.    Authorities indicators a regulation / decree.

    2.    Somebody lets IANA learn about these modifications

    3.    Relying on how a lot lead time was given and modifications introduced by different nations IANA publishes a brand new TZDB launch.

    4.    The Android group incorporates the TZDB launch (together with a small quantity further data we acquire from associated tasks and derive ourselves) into our codebase.

    5.    We roll-out these updates to your units. How the roll-out occurs will depend on the sort and age of the Android machine.

        a.    Many cellular Android units are coated by Google’s Venture Mainline, which implies that Google sends updates to units straight.

As you’ll be able to see, there are fairly a number of steps. Making use of, testing and releasing an replace can take weeks. And it isn’t simply Android and different laptop working methods prefer it who have to take motion. There are often telecoms, banks, airways and software program firms that should make changes to their very own methods and time tables. Residents of a rustic have to be made conscious of modifications in order that they know what to anticipate, particularly if they’re utilizing older units which may not obtain obligatory updates. And all of it takes time and might trigger issues for numerous individuals if it isn’t dealt with effectively. The quantity of disruption attributable to a change is often decided by the readability of the laws and see interval that governments present. The TZDB volunteers are good at recognizing modifications, however it helps if the governments notify IANA straight, particularly when it’s not clear the precise areas or present legal guidelines affected. Sadly, lots of the current time zone modifications got with a few month or much less discover time. Android has a set of suggestions for a way a lot discover to offer. Different working methods have comparable suggestions.

Android is continually evolving. One in every of such enhancements, Venture Mainline, launched in Android 10, has made a giant distinction in how we replace vital elements of the Android working system. It permits us to ship choose AOSP elements straight by way of Google Play, making updates quicker than a full OTA replace and lowering duplication of efforts completed by every OEM.

From the start, time zone guidelines had been a part in Mainline, known as Time Zone Knowledge or tzdata module. This integration allowed us to react extra shortly to government-mandated time zone modifications than earlier than. Nonetheless till 2023 tzdata updates had been nonetheless bundled with different Mainline modifications, typically resulting in testing complexities and slower deployment.

In 2023, we made additional investments in Mainline’s infrastructure and decoupled the tzdata module from the opposite elements. With this isolation, we gained the flexibility to reply quickly to time zone laws modifications — typically releasing updates to Android customers exterior of the established launch cadence. Moreover, this transformation means time zone updates can attain a far better variety of Android units, guaranteeing you as Android customers at all times see the proper time.

So whereas your Android cellphone might not be capable of restore that misplaced hour of sleep, you’ll be able to relaxation assured that it’s going to present the correct time, due to volunteers and the Android group.

Curious in regards to the ever-changing world of time zones? Discover the IANA Time Zone Database and study extra about how time and time zones are managed on Android.

*In 2018-2019 there have been modifications in Alaska. This can be a blogpost, not a technical documentation!

**As a result of the US and UK apply their daylight saving modifications at totally different native occasions and on totally different days of the yr.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles