Setting the timezone on OpenBSD servers


I have performed a number of OpenBSD installations in the past, and have always used the installer to set the timezone. One system that I recently built didn’t have a timezone set, which required me to run the zic(8) utility manually to change the timezone on the system. To set the servers timezone to Eastern with support for daylight savings time, I executed zic with the “-l” (Use the given time zone as local time) option and the timezone I wanted to use:

$ zic -l EST5EDT

Once the timezone was set, I used the rdate utility to synchronize the time on the server:

$ rdate -nv pool.ntp.org

If your not certain which timezone to use, you can check the directory /usr/share/zoneinfo. The zoneinfo directory contains the full list of timezones that can be passed to zic.

This article was posted by Matty on 2006-09-03 13:19:00 -0400 -0400