On a Linux computer, there are two times, one is the hardware time (the time recorded in the BIOS), and the other is the operating system time. The hardware clock is powered by the BIOS battery,
When the computer shuts down, it continues to run.
Time is available, regardless of hardware time or operating system time, there are time zones, by default, Ubuntu hardware time using UTC time, configuration file for
/etc/default/rcs, it is recommended to use UTC time, while the operating system time timezone corresponding to the configuration file is/etc/timezone, if you want to modify, it is best to use
sudo dpkg-reconfigure tzdata to modify the time zone, it is not recommended to modify the/etc/timezone file directly, if you want to modify the UTC time, that executes
sudo dpkg-reconfigure tzdata command, select none of the ABOVE->UTC to
Let's talk about the collaborative process between hardware time and operating system time
1, boot, the operating system from the BIOS read hardware time + time zone, according to their own time zone, converted to the corresponding time, and then the operating system time and hardware time alone
Not affect each other, the time we get through the application is operating system time
2, when the normal shutdown, operating system time to brush into the BIOS, update hardware time, abnormal shutdown, operating system time is likely not correctly written to the BIOS
To resolve an abnormal shutdown, the operating system time does not write correctly to the BIOS of the problem is: timing the operating system time to flash into the BIOS, such as one hours to swipe in,
So even if the shutdown is not normal, the difference between the two is very small and small.
Linux operating system time vs. BIOS hardware time