Re: Time Change: Centos-immune?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Mar 07, 2007 at 10:22:43AM -0800, Florin Andrei wrote:
> Stephen Harris wrote:
> >
> >Any process started before you update /etc/localtime (and ensure that
> >got updated correctly; it may not have been) may need to be restarted
> >if it uses zoneinfo information.  Two obvious ones are syslog and cron.
> >The safest solution is to reboot.
> 
> OK. So let me see if I get this right:
> 
> # ls -l /etc/localtime
> -rw-r--r--  1 root root 1017 May  5  2006 /etc/localtime
> # rpm -qf /etc/localtime
> glibc-2.3.4-2.19
> 
> The system also has tzdata-2007c
> 
> So /etc/localtime hasn't been touched in a long time, but tzdata has 
> been updated recently. That means, all daemons that haven't been 

You should compare it to your real zone file.  It's possible that it may
be correct if the later zone files didn't change anything.

On my machine (a real RH4.4 machine at work) localtime is older than
the zone file but the contents are correct:

  $ ls -l /etc/localtime /usr/share/zoneinfo/US/Eastern
  -rw-r--r--  1 root root 1267 Feb 16 13:18 /etc/localtime
  -rw-r--r--  3 root root 1267 Feb 27 10:22 /usr/share/zoneinfo/US/Eastern
  $ cmp /etc/localtime /usr/share/zoneinfo/US/Eastern  
  $ 

> restarted since /etc/localtime has been updated, need a restart. Right?

Right.  If your box hasn't been rebooted since May 5th 2006 then there's a
good chance that syslog and cron and maybe others need restarting.  If
your localtime file is out of date (check it!) then update it and restart
the affected processes.

> By the way, the system passes the empirical US DST '07 test (there's a 1 
> hour difference between the two outputs - if they were identical that 
> would be a problem):
> 
> # date --date="Mar 25 15:00:00 UTC 2006"
> Sat Mar 25 07:00:00 PST 2006
> # date --date="Mar 25 15:00:00 UTC 2007"
> Sun Mar 25 08:00:00 PDT 2007

Also note it says PDT rather than PST; a give away :-)

However, that's a new process and so read /etc/localtime as you ran
it.  Processes started _before_ the localtime update may have read an
older version and so have old data.

The main America DST fix was done a long time ago and so it's very likely
that you have a DST compliant system for your machine already in place.
Later tzdata updates have been due to Indiana, Australia, Brazil and so
on and so may not have any impact on you.

If your machine has not rebooted sunce May 2006 then I recommend you do
so.  Otherwise it's likely you will be OK.

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux