Skip to content

Date and Time

Lucas Holt edited this page Feb 7, 2025 · 4 revisions

Timezone configuration

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.

Override timezone in local shell

export TZ=America/Los_Angeles date

System clock

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!

Set the date manually

Format is date yymmddhhMM.ss

Set time to 3:30PM date 1530

Network Time

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