Nagios on OpenBSD: Web UI Timezone

Everywhere on the internet you’ll see a reference to setting the TZ environment variable in your Apache config. Except I’m using OpenBSD HTTPD, not Apache HTTPD. Furthermore, I’m using slowcgi to run the CGI scripts. Well it turns out the solution is pretty simple. Copy the zoneinfo files into httpd’s chroot directory:

# cd /
# tar -cf – /usr/share/zoneinfo /etc/localtime | (cd /var/www; tar -xf -)
tar: Removing leading / from absolute path names in the archive

Then at most you restart the services and the UI should have the correct timezone.