Skip to content
Vehicle properties
Time & clocksnot in the public Car API

ANDROID_EPOCH_TIME

What it is

Current date and time, encoded as Epoch time (in milliseconds). This value denotes the number of milliseconds seconds that have elapsed since 1/1/1970 UTC.

CarServices will write to this value to give VHAL the Android system's time, if the VHAL supports this property. This can be useful to synchronize other vehicle systems (dash clock etc) with Android's time.

AAOS writes to this property once during boot, and will thereafter write only when some time-source changes are propagated. AAOS will fill in VehiclePropValue.timestamp correctly. Note that AAOS will not send updates for natural elapse of time. int64Values[0] = provided Unix time (in milliseconds)

Note that the property may take >0 ms to get propagated through the stack and, having a timestamped property helps reduce any time drift. So, for all writes to the property, the timestamp can be used to negate this drift: drift = elapsedTime - PropValue.timestamp effectiveTime = PropValue.value.int64Values[0] + drift

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x11500606 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00500000INT64
Ordinal0x0000ffff0x000006060x606

Reading it from an app

This property is defined in the HAL but is not exposed as a constant in android.car.VehiclePropertyIds, so it is not reachable through CarPropertyManager from an ordinary app. It is used by the platform, or by vendor code running with system privileges.