I know that hardware clock is RTC, which is running still, even when PC (or another device with RTC) is off. (in linux we can see this time by typing "hwclock") The second mentioned time, system time, is the time it is really used by OS, by linux. I can see it by comamnd "date"

But I still don't know, how is system time assigned after PC start. Is there some offset value set in linux, which is then used, and the calculation of system time is done using the hardware time and this offset?

Or it is working in another way?

2 Answers 2


Yes there are these two clocks. The RTC (aka CMOS Clock/ Hardware Clock) as you referred, and the System Clock (aka Kernel Clock, Software Clock) whose value is saved in the OS config. This system clock is based on Timer Interrupts.

And as is obvious these two may some fractional offset due to which they will deviate and the OS has multiple strategies to deal with the timer drift. One of the common modern ways to keep both in sync using a Time Server like time.windows.com based on the Network Time protocol.

  • Iunknown: "and the System Clock (aka Kernel Clock, Software Clock) whose value is saved in the OS config" - this value of clock would be deprecated by next start of OS
    – srnka
    Commented Jan 26, 2012 at 10:45
  • 1
    The time is synchronized with the RTC, at the bootstrap to compensate for the offset one might have configured due to various reasons, some like to have a clock faster by few min, or the DST settings etc. After that the clock is forwarded using Programmable Interval Timer or the newer HPET.
    – IUnknown
    Commented Jan 26, 2012 at 18:10

Hardware clock vs System clock: Hardware clock is the battery powered "Real Time Clock" (also known as the "RTC", "CMOS clock") which keeps track of time when the system is turned off but is not used when the system is running


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .