FreeBSD and adjkerntz (Adjust Kernel Time Zone)

If you run FreeBSD, have you ever noticed adjkerntz -a in your periodic list and wondered what the heck it is? Well, you’re not alone. It’s actually the kernel local time clock (or time zone) synchronisation utility.

As taken from the adjkerntz man page:

adjkerntz: adjust local time CMOS clock to reflect time zone changes and keep current timezone offset for the kernel.

Description: The adjkerntz utility maintains the proper relationship between the kernel clock, which is always set to UTC, and the CMOS clock, which may be set to local time. The adjkerntz utility also informs the kernel about machine timezone shifts to maintain proper timestamps for local time file systems such as the MS-DOS file system. The main purpose of this thing is not general fixing of initially broken MS-DOS file timestamp idea but keeping the same timestamps between FreeBSD MS-DOS file system and MS-DOS operating system installed on the same machine. If the file /etc/wall_cmos_clock exists, it means that CMOS clock keeps local time(MS-DOS and MS-Windows compatible mode). If that file does not exist, it means that the CMOS clock keeps UTC time. The adjkerntz utility passes this state to the machdep.wall_cmos_clock kernel variable.

For more information, see man adjkerntz.