FreeBSD 10 installation and correct time

After installing and rebooting I get the following message:

Code:
JUL 7 18:39:18 fbsd2 ntpd[754]: time correction -18000 seconds exceeds sanity limit (1000), set clock manually to the correct UTC time.

Needless to say I chose NO to UTC, during the installation, how do I set the clock manually?

Thank you.
 
You need date(1). To set the time, you need to be root. Have a look at the man page for formatting options. In brief, you can set the date to 8 July 2014 18:39 with:
Code:
# date 201407081839
 
This setting in /etc/rc.conf will allow overriding the safety check that prevents changing the clock too much at start up:

Code:
ntpd_sync_on_start="YES"

You can use ntpdate(8) for the initial correction:

# ntpdate 0.freebsd.pool.ntp.org
 
macondo said:
Needless to say I chose NO to UTC, during the installation,
This isn't as obvious as it may seem. If FreeBSD is the only OS on the machine it won't matter much. But if you multi-boot several different operating systems it will make quite a difference and it's best to choose NO.

When I install a new machine I always check the BIOS/UEFI settings beforehand. While I'm there I also check the time and date. It doesn't have to be precise, the time can be off by a couple of minutes. It's a safety feature of NTP to not set the time if there's too much of a difference. This prevents NTP causing major problems when it gets a bogus or corrupt reply from the NTP server. But as @kpa noted this safety feature can be switched off.
 
Last edited by a moderator:
Back
Top