Fixing DST on my trusty OpenBSD box at home was so easy compared to the massive Solaris patch 'n reboot effort some coworkers and I went through recently [edit: okay, not so recently] I thought I'd post about it. My OpenBSD 3.6 box been serving me well for over two years now (from before the Energy Policy Act of 2005 was passed), hosting my mail, and giving me a box to remotely log in to when I want to do remote tests from work and such.
All I had to do was grab a bunch of timezone data files from a government site, compile and install them on my system:
mkdir /tmp/tz cd /tmp/tz curl -O ftp://elsie.nci.nih.gov/pub/tzdata2007d.tar.gz tar zxvf tzdata2007d.tar.gz rm -f tzdata2007d.tar.gz mkdir /tmp/zonefiles zic -d /tmp/zonefiles northamerica cd /tmp/zonefiles sudo cp -fRp * /usr/share/zoneinfoUnfortunately the date was still wrong. I discovered that my /etc/localtime was pointing to US/Pacific, which didn't seem to be provided by the zone data I just rebuilt. So I just switched it to America/Los_Angeles.
cd /etc ls -la localtime sudo rm -f localtime sudo ln -s /usr/share/zoneinfo/America/Los_Angeles localtimeNow the date was correct. No reboots... no lengthy kernel patches... no after hours downtime.
Just one last check:
zdump -v /etc/localtime | grep 2007 /etc/localtime Sun Mar 11 09:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 PST isdst=0 /etc/localtime Sun Mar 11 10:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 PDT isdst=1 /etc/localtime Sun Nov 4 08:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 PDT isdst=1 /etc/localtime Sun Nov 4 09:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 PST isdst=0Done.
Resources: