Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] setting system time

70 views
Skip to first unread message

the...@sys-concept.com

unread,
Apr 8, 2021, 8:10:03 PM4/8/21
to
Try to set system clock via script:

/usr/sbin/htpdate 1.ro.pool.ntp.org
/sbin/hwclock -w

But when I run it always prints:
Offset 38.000 seconds

The system clock does not adjust.

Dan Egli

unread,
Apr 8, 2021, 8:30:03 PM4/8/21
to
The hardware clock syncs to the software clock. If, when you run the
date command, it prints the correct time (accounting for timezones) then
as far as I know, that is the time your hardware clock uses. Besides, 38
seconds is not bad. Unless you are doing something between computers
that requires EXTREMELY precise time, then I wouldn't bother. If you do
want to fix things, ntpdate is kind of old (I assume that's what you
meant, as I've never heard of htpdate). You can accomplish the same
thing with the ntp command. Just use: ntpd -g -q. That will set the
clock once according to the pool server, then quit. And it sets the
clock, no matter how far off it is.

the...@sys-concept.com

unread,
Apr 8, 2021, 8:50:04 PM4/8/21
to
Yes, the "ntpd -g -q" work better; the time is adjusted correctly.

with /htpdate 1.ro.pool.ntp.org I always got the same Offset number, doesn't matter how many time I run it.
0 new messages