Description: Improve the logic used to determine current system time on boot.
Use case:
Currently system time on boot is determined by the following:
1) First it looks at RTC if there is battery on the device
2) It looks at the file created by OS when the device is shutdown with the time at shutdown (this is done' only if the shutdown is clean)
3) It looks at timestamp of the Kernel build
4) And default is 0 hours EPOCH time
In crbug.com/903543 on a device with a 32-bit processor, on an unclean shutdown the device seems to ignore this logic and boots with a time back in 2017, although the OS of this device was on 71.
Due to this issue, this caused a bug in the on-screen keyboard in this case to not show. For kiosk devices, unclean shutdowns are generally the main method that customers use to shutdown devices due to the nature of how these devices are deployed.
The proposed solution is to periodically write the system time to disk, and use that as a reference when booting the device, especially for kiosk devices that are on for extended periods of time.
Motivation:
To improve the time handling on devices, as multiple components rely on accurate time in order to function correctly.
Comment 1 by jayhlee@google.com
, Dec 27