-
-
Notifications
You must be signed in to change notification settings - Fork 6
Date and Time
The easy way to do this after installation is through the tzsetup utility. It will guide you to select the correct timezone.
The /etc/localtime file should contain the appropriate timezone. You can find a file manually from /usr/share/zoneinfo and copy it there to set the timezone manually.
Run adjkerntz -a
or reboot to take effect.
export TZ=America/Los_Angeles date
The system clock can be set to localtime or UTC. If it's utc, you want to create an empty file
touch /etc/wall_cmos_clock
If it's local time, remove that file.
If you are consistently off by your timezone offset at boot, this is likey why! NOTE: Bhyve VMs default to UTC so you need this file!
Format is date yymmddhhMM.ss
Set time to 3:30PM
date 1530
OpenNTPD is included in the base system.
Turn it on with
sysrc ntpd_enable=YES
service ntpd start
it will default to a random pool of servers. Edit /etc/ntpd.conf to tweak this
Alternatively, you can install a more precise daemon
mport install ntp
sysrc ntp_enable=YES
vi /usr/local/etc/ntp.conf
service ntp start