Difference between revisions of "Linux time synchronization"

From thelinuxwiki
Jump to: navigation, search
(Pushed from Themanclub.)
 

Latest revision as of 15:53, 12 April 2013

The your hardware clock is set to UTC (or GMT, Greenwich Mean Time) and then your timezone is taken into account to determine the actual, local time

configure timezone

on gentoo:

/etc/timezone


update time with ntp-client

then


Setting the hardware clock during shutdown

Hardware clocks are not very accurate. (See the NTP.org article on clock quality.)

To avoid this, you can set your hardware clock during shutdown.

For baselayout >= 2.0.0:

File: /etc/conf.d/hwclock
clock_systohc="YES"


manual synchronization

to synchronize your hardware time with your system time

hwclock --systohc

Again, to check your work, run:

hwclock --show

If the following error is received:

hwclock: Cannot access the Hardware Clock via any known method.

Then the real time clock is most likely not enabled in the kernel. Set in kernel config:

????