Time Zone Options

The accurate display of time is a core feature expected of an automotive infotainment system. While this may appear deceptively simple, particularly when expectations of time and time zone management are low and must be met, time quickly becomes complex when a reliably accurate date and time must be displayed without manual intervention.

All real-time clocks typically used in Systems-on-a-Chip (SoC) contain some drift, which accumulates over time and can lead to significant error when left uncorrected. In addition, because expectations are high that local time be displayed accurately, the correct offset from Coordinated Universal Time (UTC) must be considered.

Time zone information, as well as the application of Daylight Saving Time (DST), can be expected to change during the expected lifetime of a vehicle. For example, after many years of implementing DST, Brazil elected to not start a DST schedule in 2019.

Android provides the infrastructure needed to negotiate complications of time zone rule management. For details, seeTime Zone Rules, which enables OEMs to push updated time zone rules data to devices without requiring a system update.

To do so, an OEM data app (in the form of an APK) is added to the system image (for the initial release) and then signed and distributed via an app store for subsequent updates. This mechanism enables:

  • Users to receive timely updates (which extend the useful lifetime of an Android device).
  • OEMs to test time zone updates independently of system image updates.

Note: To implement this mechanism, a system reboot is required.

Note: Android Automotive 10 does not support the APEX-based module update mechanism provided in Android 10 (and higher).

Time (Zone) Information Sources in Cars

Android devices manage time in Coordinated Universal Time (UTC) at the system level, apply the desired time zone, and then convert the value to local time for display to users. The current user's zone ID (often referred to as Olson ID) is stored as a setting. For example, Europe/London.

Much of the mechanism outlined below describes time information. The intent of these standards is to provide users with the current time, not to describe the applicable time zone rules. To determine the actual time zone, the device must work back from factors such as country, offset, and DST offset prior to setting the zone ID.

The process can be a challenge. Working back based on available information can be ambiguous. For example, the time zone rule America/Denver observes DST but adopts to Mountain Daylight Time (MDT) during the summer whereas America/Phoenix continues to recognize MDT.

Cellular radio

System information (SI) is an essential aspect of the Long-Term Evolution (LTE) air interface, which is transmitted by the base station (BS) over the broadcast control channel (BCCH). 3GPP TS 36.331 specifies the SystemInformationBlockType16 (SIB16) which contains information related to GPS and Coordinated Universal Time (UTC), local time offset, as well as DST information.

Similar functionality can be found in 2G and 3G, where Network Identity and time zone (NITZ) information can be broadcast (see 3GPP TS 22.042 for details). Other cellular radio standards have equivalent features.

Unfortunately, the commonality among most standards is that the sending of this information is optional and therefore not universally available on all networks.

Pros Cons
  • When available, provides most of the desired information.
  • Simplicity, already supported by Android when cellular radio is exposed as a phone, not only as a data modem.
  • Does not require internet connectivity.
  • No guarantees that the information is broadcast nor that the base station is properly configured.

  • In border regions, liable to pick up a (roaming) cell tower from a neighboring country and potentially convey the wrong time zone.

  • In some locations, updates can requires hours, even days, to take place.

Network Time Protocol

Network Time Protocol (NTP) is often used to obtain relatively precise UTC time information. Android supports the synchronization of its system time with that of an NTP server out-of-the-box with the NewNetworkTimeUpdateService. NTP monitors network time and updates system time when it goes out-of-sync and a carrier has not recently provided a NITZ update. If the user enables AUTO_TIME when NITZ is not available, the system checks immediately for network time.

Pros Cons

Simplicity, supported by Android.

  • Incomplete, NTP provides only one needed value (time). Even in a best case scenario, NTP cannot provide the time zone.

  • Requires internet connectivity.

Broadcast Radio Tuner

While leveraging a built-in tuner to retrieve time and time zone information is appealing, challenges are involved. Numerous radio broadcast standards define options for exposing the desired information. Generally speaking, a broadcast radio tuner provides the same information as a cellular radio.

ETSI EN 300 401 V1.4.1 (2006-06), section 8.1 specifies service information features that provide supplementary information about services for both audio programme and data for Digital Audio Broadcasting (DAB) systems. Section 8.1.3 defines the format for time and date as well as information for country and local time offset.

Similarly, for the Radio Data System (RDS) commonly implemented in FM tuners, section 3.1.5.6 of the EN 50067 standard defines the format for clock-time and data (transmitted once per minute. In addition, the extended country code (ECC) can also be retrieved as part of the transmitted programme identification.

HD Radio contains corresponding options as part of the HD Radio™ Air Interface Design Description Station Information Service Transport specification in the Station Information Service (SIS) Parameter Message (MSG ID 0111). Section 5 clearly spells out cautionary words that must be heeded when attempting to use the clock support of the broadcast. The same wisdom applies equally to other systems:

... these data describe the local custom at the location of the broadcaster, which may or may not be the same as the local custom at the place of the receiver. Near time-zone boundaries, consumers can receive a multiplicity of stations providing different data. Therefore, these data are provided only as hints, the interpretation and utilization of which should be made discretionary, subject to customer control. …"

In addition, for HD Radio at least, the broadcast of this information is optional and should not, therefore, be exclusively relied upon.

Pros Cons
  • Typically available across different regional broadcast radio standards.
  • Does not require internet connectivity.
  • Android does not support this out-of-the-box.
  • Requires tuner to be turned on (at least occasionally in the background) to reliably detect information.
  • Reliability depends on the broadcaster.

Implementation Tips

The current BroadcastRadio Hal 2.0 does not provide a provision for handling time(zone) metadata. Therefore, the recommended solution is to leverage the vendor extension feature. Implementation of this functionality must occur in the Hardware Abstraction Layer (HAL) after which if can be exposed to clients of the RadioManager via the generic RadioTuner.getParameters() method.

For the solution to remain robust, the consumer of this vendor extension must determine that the HAL supports the feature (do not assume its existence). Parameter strings for the getParameters call must be cleanly organized for unambiguous usage across vendors. For example, using the namespace of your organization by prefixing it with the appropriate domain as in "com.me.timezoneTuner.currenttimezone"

Given the event-driven nature of the information, it can be beneficial to use the RadioTuner.Callback.onParametersUpdated() callback for receiving this information. In case this facility should be configurable, design a set of custom routines on top of setParameters. For example:

com.me.timezoneTuner.currenttimezoneEvent.enable

On its own, the Global Navigation Satellite System (GNSS) can only provide (very) accurate time information as well as position. Also on its own, it is somewhat more self-sufficient than NTP but suffers the same problem described in Network Time Protocol, namely the lack of trustworthy time zone information.

Geolocation

The solution to this inconvenience is to execute reverse-geocoding and determine the country and time zone by doing a lookup based on position. GNSS is the obvious (and best quality) choice of location information in a vehicle. Google's Time Zone API offers all that's needed to run the required conversion. Of course, internet connectivity is required. Ensuring user privacy must be a top priority when implementing an online solution! The permission of a user to accept data usage costs (or not) is required and must be requested.

It is feasible to create a suitable solution for offline usage. A local map database with sufficient resolution to accurately determine the country and time zone can fit into a vehicle's storage. With this and a fully implemented strategy for updating the time zone (and country) information as needed in place, one can reverse-geocode the country/time zone based on the GNSS position obtained from the Location subsystem.

Pros Cons
  • Can unambiguously determine the correct time zone.
  • Does not require internet connectivity (in case of local DB).
  • Works reliably for most driving scenarios.
  • Android does not support this out of the box.
  • If the vehicle is indoors/a covered area where good GNSS satellite reception is not possible during initial configuration, it is impossible to get accurate time, location and time zone information.
  • Local database needs an update mechanism.
  • Implementation complexity.

Phone Connected through Bluetooth, Wi-Fi, or USB

Several technologies can be used to leverage a user's phone to obtain time and time zone data. For all phones, a pair of custom application and companion apps must be installed on the phone and on the In-Vehicle Infotainment (IVI) system. It is then possible to synchronize time at the desired interval. For example, upon establishing the connection and when the phone detects a new in time zone.

Some phones that support Bluetooth Low Energy (BLE) provide the option of retrieving time via the GATT Current Time characteristic and the Current Time Service Profile Specification 1.1. However, this option does not address a sufficiently large market segment to be exclusively relied upon.

Pros Cons
  • Does not require internet connectivity

  • Time zone changes detected by phone can be relayed to the head unit.

  • Android does not support this out of the box.

  • Works only while the phone is connected to the head unit.

  • Time will be as good or bad as what the phone provides.

  • Implementation complexity.

  • Only some phones support the BLE GATT Current Time Service profile.

Using Sources

Every device vendor must determine how high a bar to set and which user journeys to deem most critical. Only with a clear understanding of the desired critical user experiences can the best decision be arrived at. In most cases, vendors must consider the tradeoffs between convenience and implementation complexity.

Each option described above poses advantages and disadvantages. For example, a critical design choice must be made with regard to how much resilience, as compared to occasional poor time display, is acceptable and how to manage the downsides. A fully automatic solution that can be expected to function well in all scenarios yet must be based on a combination of several information sources. No single option can provide 100% availability.

A manual configuration option as a temporary fallback is easy to execute and can, in practice, be sufficient for many users.