Working with Linux time is not too complex, but there's a few things you
need to understand, and that is that it all starts with hardware time.
Hardware time is the time that is on the BIOS clock of your computer.
And when you boot your computer, your hardware time is the foundation
for the system time in the system time is your software time.
So if the hardware time is off, your system time is going to be off as well.
And as hardware clocks are not always very reliable, we like to synchronize time from the Internet.
That's where NTP comes in, the Network Time protocol.
Now, network time protocol is normally used to synchronize time on your system.
And there will be an NTP solution on your system that makes sure that your system time is always up to date.
So if there is a small difference between the hardware clock and the system time,
NTP will take care of the difference and it will synchronize this difference away.
If the difference is too big, however bigger than 1000 seconds, then your system is going to refuse
to communicate with this NTP clock because the difference is too big and something might be wrong here.
That is where a command like hwclock comes in handy. Because in
hw clock, you can use the parameter sys2hc to synchronize the system
time with the hardware clock and make sure that everything is okay.
So that ensures that all the applications that are running on your
Linux system have the most reliable time that you can imagine.