SCIENTIFIC-LINUX-USERS Archives

March 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Steven J. Yellin" <[log in to unmask]>
Reply To:
Steven J. Yellin
Date:
Thu, 1 Mar 2007 19:50:42 -0800
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (172 lines)
    Regarding these lines of Michael's reply to Michael:
>
> > And regarding /etc/localtime: I don't know the format of the file,
> > but in all of the systems in our classroom the file /etc/localtime
> > has exactly the same size (1017 bytes) and has exactly the same
> > "strings" output.
>
> You read the file through the zdump utility.
>
> > My second question: is it safe to assume that any two systems at the
> > same revision of SL and in the same time zone have exactly the same
> > contents in /etc/localtime?
>
> You should check them all with the timeconfig command or use a parallel
ssh
> system to run zdump on the all and show you the output.
>

    At least on my SL3.0.8 system, zdump does NOT read /etc/localtime.
Instead, a command such as
   zdump -v "America/Los_Angeles" | grep 2007
reads /usr/share/zoneinfo/America/Los_Angeles.  If you don't believe me,
try temporarily moving that file somewhere else before giving the zdump
command.  On the other hand, the "date" command does use /etc/localtime,
as you can verify by temporarily moving that file someplace else before
giving the "date" command.
   Of course it's not "safe to assume that any two systems at the
same revision of SL and in the same time zone have exactly the same
contents in /etc/localtime".  For one thing, you could move whatever
you want into /etc/localtime.  But what really interests you is whether
/etc/localtime is correct on all systems if tzdata is up-to-date.  Maybe.
For example, it probably is on SL3.0.8, and itprobably isn't on SL3.0.4.
See

 http://kbase.redhat.com/faq/FAQ_79_9950

The problem is that on some systems the old, still secure and therefore
not updated, glibc-common is not wise enough to have the update of tzdata
able to also update /etc/localtime.  Assuming your zone is
"America/Los_Angeles", try checking that no differences are found from

 diff /etc/localtime /usr/share/zoneinfo/America/Los_Angeles

If the zdump command gives the right output, and if /etc/localtime
is correct on one computer, you can check /etc/localtime and
/usr/share/zoneinfo/America/Los_Angeles on your other computers by
verifying that

md5sum /etc/localtime /usr/share/zoneinfo/America/Los_Angeles

gives the same output for all computers as for the one you know is right.

Steven Yellin

On Fri, 2 Mar 2007, Michael Mansour wrote:

> Hi Michael,
>
> > Greetings.  This could be sub-titled "When is Los Angeles !=
> > Tijuana?".   I suppose this a mainly a west-coast issue, but in the
> > past I have often chosen "America/Tijuana" as our time zone when
> > installing SL or the upstream distribution.  It just seems a little
> > easier to point the arrow on the map to Tijuana, and both places
> > have been listed as US/Pacific, so how could it matter?
> >
> > Now it seems that it DOES matter.  We've just started to look into
> > the ramifications of the looming implementation of the changes in
> > the rules for Daylight Savings Time (DST).  It appears that there
> > has been a tzdata update for almost a year that supposedly deals
> > with the new rules.
> >
> > Evidently, one can check that the update has been installed by using
> > the "zdump" command (see the appended).  On the first system we
> > checked, the   time zone was set to "America/Tijuana", and the zdump
> > check showed the OLD DST rules were in effect.
> >
> > We re-ran system-config-date and selected, as the only change, the
> > time zone "America/Los_Angeles".  A subsequent run of zdump showed
> > that the NEW DST rules were now being used for that zone.
> >
> > Thus, I believe that the story has a happy ending, at least for this
>
> You should note also that when applications start up, they use the TZ settings
> at the time they started up. This means that any change you make to TZ may be
> applied, but various apps and time dependent processes still running (xinetd,
> crond, mysql, oracle, etc) will still have the old DST settings in place
> regardless what the OS says (they don't check this while they are running in
> memory).
>
> You can stop/start various services, stop/start various apps and DB's to try
> and overcome this, but the only way to guarantee everything uses the new DST
> info is to reboot.
>
> > system.  But I would like not to have to run an interactive utility
> > on every system for which we have to make this change.  It would be
> > easy enough (sed or equivalent) to make an automated edit of
> /etc/sysconfig/clock.
> >
> > On the other hand, it appears that the time-zone information must
> > also be reflected in the data file /etc/localtime.
> >
> > My first question is: is the time-zone information stored any place
> > besides the two files /etc/sysconfig/clock and /etc/localtime?
>
> The /etc/localtime file is just a copied file from the /usr/share/zoneinfo/*
> directories. You can update it by running the command "timeconfig".
>
> > And regarding /etc/localtime: I don't know the format of the file,
> > but in all of the systems in our classroom the file /etc/localtime
> > has exactly the same size (1017 bytes) and has exactly the same
> > "strings" output.
>
> You read the file through the zdump utility.
>
> > My second question: is it safe to assume that any two systems at the
> > same revision of SL and in the same time zone have exactly the same
> > contents in /etc/localtime?
>
> You should check them all with the timeconfig command or use a parallel ssh
> system to run zdump on the all and show you the output.
>
> Regards,
>
> Michael.
>
> > Thanks.
> >
> > 					- Mike
> >
> > [root@xxxxxx sysconfig]# cat clock
> > ZONE="America/Tijuana"
> > UTC=true
> > ARC=false
> >
> > [root@xxxxxx sysconfig]# zdump -v "America/Tijuana" | grep 2007
> >
> > America/Tijuana  Sun Apr  1 09:59:59 2007 UTC = Sun Apr  1 01:59:59
> > 2007 PST isdst=0 gmtoff=-28800
> > America/Tijuana  Sun Apr  1 10:00:00 2007 UTC = Sun Apr  1 03:00:00
> > 2007 PDT isdst=1 gmtoff=-25200
> > America/Tijuana  Sun Oct 28 08:59:59 2007 UTC = Sun Oct 28 01:59:59
> > 2007 PDT isdst=1 gmtoff=-25200
> > America/Tijuana  Sun Oct 28 09:00:00 2007 UTC = Sun Oct 28 01:00:00
> > 2007 PST isdst=0 gmtoff=-28800
> >
> > [root@xxxxxx sysconfig]# system-config-date
> >      (change only the time zone: America/Los_Angeles)
> >
> > [root@xxxxxx sysconfig]# cat clock
> > ZONE="America/Los_Angeles"
> > UTC=true
> > ARC=false
> >
> > [root@xxxxxx sysconfig]# zdump -v "America/Los_Angeles" | grep 2007
> >
> > America/Los_Angeles  Sun Mar 11 09:59:59 2007 UTC = Sun Mar 11
> > 01:59:59 2007 PST isdst=0 gmtoff=-28800
> > America/Los_Angeles  Sun Mar 11 10:00:00 2007 UTC = Sun Mar 11
> > 03:00:00 2007 PDT isdst=1 gmtoff=-25200
> > America/Los_Angeles  Sun Nov  4 08:59:59 2007 UTC = Sun Nov  4
> > 01:59:59 2007 PDT isdst=1 gmtoff=-25200
> > America/Los_Angeles  Sun Nov  4 09:00:00 2007 UTC = Sun Nov  4
> > 01:00:00 2007 PST isdst=0 gmtoff=-28800
> >
> > --
> > Michael Hannon            mailto:[log in to unmask]
> > Dept. of Physics          530.752.4966
> > University of California  530.752.4717 FAX
> > Davis, CA 95616-8677
> ------- End of Original Message -------
>

ATOM RSS1 RSS2