LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   RH9 DST 2007 update not current ... (https://www.linuxquestions.org/questions/red-hat-31/rh9-dst-2007-update-not-current-535492/)

jmor3 03-07-2007 04:25 PM

RH9 DST 2007 update not current ...
 
I updated one of my RH9 servers for the DST 2007 change this weekend, and I noticed that I get two different values when I use zdump:

# zdump -v /etc/localtime | grep 2007 shows me the old DST info (April and October)
# zdump -v /usr/share/zoneinfo/PST8PDT | grep 2007 shows me the new DST info (March and November)
# zdump -v /usr/share/zoneinfo/America/Los_Angeles | grep 2007 shows me the new DST info (March and November)

I pasted together some directions from a few forum postings, and now I'm wondering if I did something wrong (or out of order). Here are the steps I used:

- Go to ftp://elsie.nci.nih.gov/pub/ and download tzcode2007c.tar.gz and tzdata2007c.tar.gz
- Create a /tz directory and copy the two .tar.gz files into a /tz directory on the server
- Uncompress the two files ('gzip -dc tzcode*.tar.gz | tar -xf -' and 'gzip -dc tzdata*.tar.gz | tar -xf -')
- Run 'zic -d /tmp/zoneinfo northamerica' to compile the timezone data files.
- Run 'cp -p /tmp/zoneinfo /usr/share/zoneinfo' to replace the old file
- Check the updates with the zdump commands listed above

So the values look right in the /usr/share/zoneinfo files, but not in my /etc/localtime. Do I need to restart something to update the settings?

Any help would be greatly appreciated!

Thanx, Raoul

Lenard 03-08-2007 08:58 AM

You forgot to update/replace the /etc/localtime file, just copy the /usr/share/zoneinfo/America/Los_Angeles as a replacement.

jmor3 03-08-2007 09:52 AM

Success!
 
Thank you - I forgot that the localtime info is static (so a restart won't write the values into /etc/localtime). For anyone who may want to see the last step:

- After copying the timezone data files to /usr/share/zoneinfo, I backed up the current localtime file just for fun (cp /etc/localtime /etc/localtime.predst2k7), then copied the Los Angeles timezone file over the current localtime file (cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime). Zdump now reports March and November as the start and end times for DST for /etc/localtime.

Thank you! Raoul

ACDII 03-08-2007 11:39 AM

What do you do with a server that doesnt have internet access?

lord-fu 03-08-2007 11:39 AM

Hi does the instructios above apply to RH 9? I tried to do the above but recieve the old information still when running zdump.

Lenard 03-08-2007 11:46 AM

Yes, the instructions by jmor3 apply (for almost any version of Linux), remember to update the /etc/localtime file and you need to be root for this.

lord-fu 03-08-2007 12:18 PM

Using this thread here and a little of this one http://www.linuxquestions.org/questi...d.php?t=518752
made me realize my mistake, thanks for the info guys!

lord-fu 03-08-2007 02:37 PM

Just a quick question, I am returning correct info now from zdump, but do we need to reboot our machines?,or should I be good, 90% of our Linux machines are production servers and a reboot is kinda almost out of the question.

TIA

Lenard 03-08-2007 02:59 PM

You should be good to go (Is this a Taco Bell commercial????)

It is bad idea to wait until this coming Sunday morningearly to install the timezone changes. Depending on the timing your nightly cron jobs may run twice or not at all.

lord-fu 03-08-2007 03:14 PM

Quote:

It is bad idea to wait until this coming Sunday morningearly to install the timezone changes.
Well I have done what is in this post and made backups and pushed new files into place, is there another step I am missing?

TIA

Lenard 03-08-2007 04:15 PM

Nope, all the services should be fine by the time the DST change takes place.

lord-fu 03-08-2007 08:03 PM

Awesome, thank you.

rch1231 03-10-2007 12:06 PM

You can test to see if the update worked or is working with:

date -d '27 March'

ACDII 03-11-2007 10:00 AM

DOH missed copying the new file to localtime. Did that and rebooted, now all the servers show the correct time.


All times are GMT -5. The time now is 01:43 AM.