Tuesday, March 06, 2007

Quick and easy FreeBSD DST updates

So congress made it interesting for computer admins everywhere this year by extending daylight savings time. Life's going to be easier for us if we update the timezone files on our systems before March 11, 2007, and today I did a little digging to find out how to make FreeBSD systems compliant with the new rules. It's pretty easy if you keep /usr/src current. I've read that up-to-date FreeBSD 5.5 and 6.2 systems should have the right data, but I don't know if the zoneinfo files were backported to previous releases. Here's whatcha wanna do:
    # check if you need to update
zdump -v /etc/localtime | grep 2007 |head -2

If you see April 1, 2007, you need to update your timezone and probably your /usr/share/zoneinfo files:
    (cd /usr/src/share/zoneinfo; make install)
tzsetup /usr/share/zoneinfo/PST8PDT

Then doublecheck that you got it all right with the zdump command again. If you don't know the path of the right zoneinfo file, you can just run tzsetup without any args and it'll walk you through a little menu system to figure it out. That gets real tedious if you have a lot of systems, though, so I took the time to find the right file.

Apparently you can also install the misc/zoneinfo port, but you'll still have to run tzsetup when you're done. If you have the right data in /usr/src, I don't see any value in using the port, and it just adds a little unnecessary mess to your ports db if you don't need it.

Labels: ,

0 Comments:

Post a Comment

<< Home