From owner-freebsd-questions@FreeBSD.ORG Tue Mar 4 05:20:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 541CF106566B for ; Tue, 4 Mar 2008 05:20:47 +0000 (UTC) (envelope-from tedm@toybox.placo.com) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id 0CD088FC19 for ; Tue, 4 Mar 2008 05:20:46 +0000 (UTC) (envelope-from tedm@toybox.placo.com) Received: from TEDSDSK (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) by mail.freebsd-corp-net-guide.com (8.13.8/8.13.8) with SMTP id m245KiS2025316; Mon, 3 Mar 2008 21:20:46 -0800 (PST) (envelope-from tedm@toybox.placo.com) From: "Ted Mittelstaedt" To: "Lisa Casey" , Date: Mon, 3 Mar 2008 21:21:44 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Importance: Normal In-Reply-To: <003501c87bd9$78cb53d0$d5b9bfcf@lisac> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (mail.freebsd-corp-net-guide.com [65.75.192.90]); Mon, 03 Mar 2008 21:20:46 -0800 (PST) Cc: Subject: RE: Daylight Savings time X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 05:20:47 -0000 > -----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