Solved ntpd

my system's time is always 8h ahead, and my bios time is the same as my system's time. I had added these lines to my /etc/rc.conf:

Code:
ntpd_enable="YES"
ntpd_sync_on_start="YES"

I had also added these lines to /etc/ntp.conf:

Code:
server 0.freebsd.pool.ntp.org iburst maxpoll 9
server 1.freebsd.pool.ntp.org iburst maxpoll 9
server 2.freebsd.pool.ntp.org iburst maxpoll 9
server 0.cn.pool.ntp.org
server 1.cn.pool.ntp.org
server 2.cn.pool.ntp.org
server 3.cn.pool.ntp.org

and comment out :

Code:
 pool 0.freebsd.pool.ntp.org iburst

system's time is still not right.How to set up?
 
ntpdate -q 0.cn.pool.ntp.org :

Code:
server 139.199.214.202, stratum 2, offset +0.046107, delay 0.07494
server 193.182.111.12, stratum 2, offset +0.073250, delay 0.34587
server 185.209.85.222, stratum 2, offset -0.049343, delay 0.32890
server 119.28.183.184, stratum 2, offset +0.051282, delay 0.10747
11 Jul 21:52:25 ntpdate[5037]: adjust time server 139.199.214.202 offset +0.046107 sec
 
As long as you don't dual boot with other operating systems it wouldn't matter if the clock is set to GMT or localtime. ntpd(8) would just correct it. Things get interesting if you dual boot the same machine with Windows and/or Linux though. If FreeBSD assumes the BIOS clock is GMT and Windows/Linux assumes it's local time (or vise versa) you get interesting issues when booting from one OS to the other. Easily solved by making sure everything expects the same clock (either GMT or local time) setting.
 
  • Like
Reactions: mer
Back
Top