Date: Mon, 3 Mar 2008 21:21:44 -0800 From: "Ted Mittelstaedt" <tedm@toybox.placo.com> To: "Lisa Casey" <lisa@jellico.com>, <freebsd-questions@freebsd.org> Subject: RE: Daylight Savings time Message-ID: <BMEDLGAENEKCJFGODFOCCEHECFAA.tedm@toybox.placo.com> In-Reply-To: <003501c87bd9$78cb53d0$d5b9bfcf@lisac>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Lisa Casey > Sent: Saturday, March 01, 2008 12:19 PM > To: freebsd-questions@freebsd.org > Subject: Daylight Savings time > > > Hi, > > I suspect my FreeBSD 5.2 system isn't going to handle the change > to Daylight Savings Time correctly next weekend: > > zdump -v /etc/localtime | grep 2008 > /etc/localtime Sun Apr 6 06:59:59 2008 UTC = Sun Apr 6 > 01:59:59 2008 EST isdst=0 gmtoff=-18000 > /etc/localtime Sun Apr 6 07:00:00 2008 UTC = Sun Apr 6 > 03:00:00 2008 EDT isdst=1 gmtoff=-14400 > /etc/localtime Sun Oct 26 05:59:59 2008 UTC = Sun Oct 26 > 01:59:59 2008 EDT isdst=1 gmtoff=-14400 > /etc/localtime Sun Oct 26 06:00:00 2008 UTC = Sun Oct 26 > 01:00:00 2008 EST isdst=0 gmtoff=-18000 > > Could someone help me remember the steps I need to take to correct this? > Here's a little very hacky script I put together last year. I forget where you get the current timezone files, you can google for that. The process is explained in the script. you will need to adjust for your location, it should be obvious where. Some BSD versions uses a link. Some other unices just copy the zonefile in. I manage a number of different unices. #!/bin/sh zdump -v /etc/localtime | grep 2007 echo If sun Mar 11 and Nov 1 then OK echo Otherwise stop script now and rerun from clean temp dir echo "also ls -l /etc |more and check that localtime is not a link" sleep 5 fetch ftp://server.example.com/pub/tzdata2007c.tar.gz tar -xzf tzdata2007c.tar.gz zic -d zoneinfo northamerica cp -R zoneinfo/* /usr/share/zoneinfo zdump -v /usr/share/zoneinfo/PST8PDT | grep 2007 zdump -v /usr/share/zoneinfo/America/Los_Angeles | grep 2007 echo "if localtime is a link then Cntl-C, stop and rm /etc/localtime then" echo "ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime" sleep 5 cp /usr/share/zoneinfo/PST8PDT /etc/localtime zdump -v /etc/localtime | grep 2007 echo If Sun Mar 11 and Nov 1 then OK echo "now rm -r this temp dir" Ted
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BMEDLGAENEKCJFGODFOCCEHECFAA.tedm>