If you have ever powered on an Android box or stick without a working internet connection, you might have noticed that some devices don’t show the correct date and time after startup. The date can be a couple years or couple hours in the past and it suddenly updates once you connect the box to the internet.
If you wondered why the date and time is not correct after startup, this article will explain it.
Real time clock (RTC)
Keeping the information about current time requires electricity. Same as your wrist watch won’t work without a battery, a clock in an electronic device requires power. When a device is turned off, unplugged from a power source and has no battery, there is no electricity to keep the internal clock of the device running and it powers off as well. When you power on such a device, it either starts with some date set by the manufacturer or the same date & time as when it was last powered off.
This effect is not limited to Android devices. You might have seen a similar effect in the past on an old computer with a dead CMOS/BIOS battery. After powering on you can see entirely wrong time in Windows and the only solution is to replace the dead battery.
To keep the date & time correct even in case the device is completely without power, the manufacturer of the device has to add a hardware module called real-time clock (RTC). It is a very low power chip with an oscillator and a small battery or a capacitor, which keeps the device clock always correct, no matter if the device is on or off, with power or without.
RTC in Android boxes
If an Android box doesn’t have an RTC module, the only way for the box to get the correct date and time is to get it from the internet using Network Time Protocol (NTP). There are many NTP servers available all over the world and Android is automatically configured to contact them, ask them for the correct current time and set this time internally. As long as the device is running, it will keep the time correct even if you disconnect it from the internet (the clock might drift a couple of seconds if you keep the device running for a very long time).
In the past the majority of Android boxes and sticks didn’t have the RTC module, so internet connection was a must if you wanted to have the correct time. Luckily the situation is getting better and you can now easily find an Android box that has an RTC module and keeps the time correct across power offs even without an internet connection. Usually you can find mention of “RTC” in the specifications of the device.
From the devices I have tested in the past months, Rikomagic DS03 and Ugoos X2 Pro have RTC modules working out of the box. Zidoo Z9X has an RTC module, but there is no battery installed in it from the factory, so it resets the clock to 1 January 2018 after each reboot.
Date & time in Slideshow app
The current date & time is used in multiple places across Slideshow app, for example:
- Displaying the current date & time to the user
- Switching screen layouts and playlists according to the time slots
- Deleting files that are scheduled to be deleted at some time