How-tos  Scripts  Pricing  Testimonials  Support  Newsletter

Tested on OpenBSD 6.3

Set time zone on OpenBSD

Check your current time with date(1):

# date
Thu Apr  5 12:26:43 UTC 2018
#

The local timezone is UTC.

Check /etc/localtime with readlink(1):

# readlink /etc/localtime
/usr/share/zoneinfo/UTC
#

It's a symbolic link to UTC time zone file.

Find a file for the time zone you want to set with find(1):

# find /usr/share/zoneinfo -name 'Mos*'
/usr/share/zoneinfo/Europe/Moscow
...
#

Set timezone with zic(8).

# zic -l Europe/Moscow
#

Check the time zone:

# readlink /etc/localtime
/usr/share/zoneinfo/Europe/Moscow
# date
Thu Apr  5 15:26:51 MSK 2018
#

© 2008–2019 Roman Zolotarev  User Agreement  Privacy Policy