[lug] turn daylight savings time off

Matt Thompson thompsma at jilau1.colorado.edu
Fri Apr 1 09:40:40 MST 2005

On Fri, 2005-04-01 at 09:08 -0700, Gary Hodges wrote:
> I thought I asked about this once before on this group or the debian 
> list but I can't find anything.  Is there a way to turn off daylight 
> savings time so that a machine (deb sarge) will always run on local 
> standard time?  I accomplish this in Mountain Time by choosing Arizona, 
> Central by choosing Saskatchewan and Eastern by selecting Indiana.  Best 
> I can tell there isn't a Pacific time zone that doesn't go to daylight 
> savings.

Hmm, I can think of two ways to do this.  The first is setting the TZ
environment variable to whatever the POSIX TZ setting you like.  I think
the TZ format is described in tzset(3) and tzselect semi-automates this
(or at least can check your TZ string for POSIX-ness).

The elegant way would be to compile your own zoneinfo file using zic and
zdump that you can symlink to /etc/localtime.  That said, I've only ever
kind of played around with zic and zdump, so I'm not the best authority.
I know I can tell when DST begins and ends:

> zdump -v -c 2006 US/Mountain | grep 2005
US/Mountain  Sun Apr  3 08:59:59 2005 UTC = Sun Apr  3 01:59:59 2005 MST
isdst=0 gmtoff=-25200
US/Mountain  Sun Apr  3 09:00:00 2005 UTC = Sun Apr  3 03:00:00 2005 MDT
isdst=1 gmtoff=-21600
US/Mountain  Sun Oct 30 07:59:59 2005 UTC = Sun Oct 30 01:59:59 2005 MDT
isdst=1 gmtoff=-21600
US/Mountain  Sun Oct 30 08:00:00 2005 UTC = Sun Oct 30 01:00:00 2005 MST
isdst=0 gmtoff=-25200

but I've never really wanted to mess with zic for fear of wiping out all
of the tzdata.  Maybe someone on the list is a zguru?

The mayfly lives only one day, and sometimes it rains. - Geo. Carlin
   Matt Thompson -- http://ucsub.colorado.edu/~thompsma/
   440 UCB, Boulder, CO  80309-0440
   JILA A510, 303-492-4662
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3355 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20050401/301bf656/attachment.bin>

More information about the LUG mailing list