OpenBSD Set / Configure Time Zone

‮‬www.lautturi.com
OpenBSD Set / Configure Time Zone

To set the time zone in OpenBSD, you will need to modify the /etc/localtime file. This file is a symbolic link to the appropriate time zone definition file in the /usr/share/zoneinfo directory.

To set the time zone, follow these steps:

  1. Determine the time zone you want to use. You can find a list of available time zones in the /usr/share/zoneinfo directory. Each time zone is represented by a file in this directory, with the file name corresponding to the name of the time zone. For example, the file for the EST time zone is EST.

  2. Delete the existing /etc/localtime file. This can be done with the following command:

rm /etc/localtime
  1. Create a new symbolic link to the appropriate time zone definition file. For example, to set the time zone to EST, you would use the following command:
ln -s /usr/share/zoneinfo/EST /etc/localtime
  1. If you are using the OpenBSD system clock rather than a hardware clock, you will also need to set the system clock to the correct time. You can use the date command to set the system clock. For example:
date MMDDhhmmYYYY

Replace MMDDhhmmYYYY with the current month, day, hour, minute, and year. For example, to set the system clock to October 31st at 11:59 PM, you would use the following command:

date 103123592020

Keep in mind that these are just general steps, and your specific configuration may vary depending on your system's setup. Consult the OpenBSD documentation for more detailed information.

Created Time:2017-10-30 10:17:54  Author:lautturi