MikeL's FreeBSD howto - Clock adjust

Something I'd strongly recommend you do is to have your system's clock set for you automatically every time you reboot. As we're talking about Unix here, this won't be very often, but it'll surely be better than not doing it at all. (If you want to have your clock corrected more frequently, start with a 'man ntpdate'.)

[note 02/18/2014] 'ntpdate' is ok, but do not run 'ntpd' on your system unless you are updated - there is a nasty ddos attack going on through this.

To have this done at boot time, simply add the following to /etc/rc.conf:

ntpdate_enable="YES"
ntpdate_program="ntpdate"
ntpdate_flags="-b timeserver"
Where I have the word "timeserver", you should put the system name or IP address of your upstream providers time server. Ask your ISP for his ntpdate server's address.
Note also that if you set up Samba for DOS/Windows file shares, you can have the time set on the DOS/Windows machines automatically at logon. Do a 'man 5 smb.conf' for more info.
Okay, so they changed the DAYLIGHT SAVING TIME dates...
(reference: article at techrepublic)
as root:
cd /tmp
ftp elsie.nci.nih.gov
(login as anonymous)
cd /pub
binary
dir
(find tzdata file -- use its name where I used tzdata2007c)
get tzdata2007c.tar.gz
quit
mkdir tzplay
cd tzplay
tar xvf ../tzdata2007c.tar.gz
zic -d zoneinfo northamerica
cd zoneinfo
cp -r * /usr/share/zoneinfo/
(You'll want to use your TZ string where I've used PST8PDT)
zdump -v /usr/share/zoneinfo/PST8PDT | grep 2007
ln -fs /usr/share/zoneinfo/PST8PDT /etc/localtime
cd /tmp
rm -r tzplay
rm tzdata2007c.tar.gz

Note that to synch up your Windows boxes, as of Windows XP, they have finally built in an NTP client.
Hit Start button->Settings->Control Panel->Date and Time
Hit the "Time Zone" tab at the top left. Set your time zone.
Notice the new "Internet Time" tab, click this.
Set the name of your time server here. Typically this will be your corporate gateway, or your upstream providers network time server. Please note that this setting should use a "stratum 3" or 4 server unless this system you're configuring is to be a high stratum server to provide for many other systems.
And another thing you should do...
If your FreeBSD system is providing DHCP, you should configure it to provide the NTP server information to DHCP clients. (This is very easy.) Simply edit your /usr/local/etc/dhcp.conf and add the line option ntp-servers a.b.c.d; with your time server's ip address. You can list multiple servers, seperate them with a comma.
Copyright © 1995-2017 Mike Lempriere