LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-05-2007, 05:56 PM   #46
pratul
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
DST update for older versions 7.1 and 7.2 for Linux


Quote:
Originally Posted by Kaiyn
Does the same fix apply to RH 7.2 (before Fedora)? If not, do you know how to fix this?
Here is the process which works for 7.1 / 7.2 etc :

******************************************************
Using ZIC to compile / extracting Zone files: (Elegant / Simple process) – works well for any older Linux 7.1 /7.2 versions etc.

Download the most recent version of the time zone text files from the public domain time zone database < ftp://elsie.nci.nih.gov/pub/>, and compile the files yourself with zic.

Download the file named tzdata2007c.tar.gz

This is just an example of just making the America/Los_Angeles zone DST compiled and replace in your presently running linux system, without a break in service. Obviously you could do this for any timezone or all of them.

Download above tar file / unpack it / get your hands on the directory called

“tzdata2007c”

Logon as root
mkdir /root/DST2007 [ this directory is just a working location for my old timezone files backup. You can name anything and location can be anything ]
CD
CD DST2007
COPY / backup present timezone data files: cp –r /usr/share/zoneinfo (and later change the name as oldtimezonebackupfiles)
Unpack the tar file mentioned above and get the tzdata2007c directory. Keep one copy in your work location /root/DST2007 as backup and copy one to /tmp directory.

cd /tmp/tzdata2007c
zic –d /tmp/zoneinfo northamerica

this will compile the time zone files into a directory /tmp/zoneinfo.

Check if dates look correct by doing zdump –v /tmp/zoneinfo/America/Los_Angeles |grep 2007 . [ Note :you see March 11th and Nov 4th ] .

cd /usr/share
rm –rf zoneinfo
mv /tmp/zoneinfo .

cd /etc
ln –sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
check again the correct dates by zdump –v /etc/localtime |grep 2007

***************************************************************

Last edited by pratul; 03-05-2007 at 05:58 PM.
 
Old 03-09-2007, 09:04 AM   #47
dougwo
LQ Newbie
 
Registered: Jul 2004
Posts: 28

Rep: Reputation: 1
Ugh!

I have one server that is FC 3 and other that is FC 4. Both have the required tzdata (2005m-1) or greater on them. Yet both are still reporting the old daylight savings time. What should I do? I re-updated the packages and restarted the machines. No luck.
 
Old 03-09-2007, 09:11 AM   #48
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
tzdata updates the zonefiles but NOT /etc/localtime. You need to copy (or link) /etc/localtime to the zone you want.

e.g. cp -p /usr/share/zoneinfo/America/New_York /etc/localtime if you want to use Eastern time for the US (or /usr/share/zoneinfo/EST5EDT).

Then type "zdump -v /etc/localtime |grep 2007" to verify it has what you expect.
 
Old 03-09-2007, 12:17 PM   #49
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
ugh, we found a Redhat 6 box with Oracle 8 on it.

Appears that zdump isn't available, is there something equivalent waaay back then?
 
Old 03-09-2007, 12:27 PM   #50
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
Quote:
Originally Posted by bic
ugh, we found a Redhat 6 box with Oracle 8 on it.

Appears that zdump isn't available, is there something equivalent waaay back then?
well, copying it from a RH 9 system seems to work ok.
 
Old 03-09-2007, 04:40 PM   #51
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Copying the zdump binary or the zone file or both?
 
Old 03-10-2007, 07:39 AM   #52
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
Quote:
Originally Posted by jlightner
Copying the zdump binary or the zone file or both?
just the binary.

the compile works, but it still used the old time zones.

we ended up saying forget it, something along the lines of the system is soo old but critical enough it's not worth it to try to fix and possibly break it. Then we'd have another big problem.
 
Old 03-10-2007, 10:26 AM   #53
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Does 6 have an /etc/localtime?

If so did you copy the compiled file over /etc/localtime then run:
zdump -v /etc/localtime |grep 2007 ?
 
Old 03-10-2007, 11:29 AM   #54
rch1231
Member
 
Registered: Mar 2007
Location: Bedford, Texas
Posts: 31

Rep: Reputation: 15
If it helps I put together a shell script to do all of the parts for you. I needed to update 30 servers and wanted a quick way.

wget txlinux.com/tzupddate.sh

then run it with

sh ./tzupdate.sh
 
Old 03-10-2007, 12:18 PM   #55
rch1231
Member
 
Registered: Mar 2007
Location: Bedford, Texas
Posts: 31

Rep: Reputation: 15
A script based on the posting here that fixes the issue for CentOS and redhat 7 or 8 and Fedora Core. Help your selves. I had 30 servers to update.

#!/bin/bash
echo "This script is provided at no charge and does not in any way guarantee the files will install"
echo "or that the update will work. The user is free to run the script or to simply look at the script"
echo "decide for them selves what needs to be done. The script is based on information from the following"
echo "posting on the internet:"
echo "http://www.linuxquestions.org/questions/showthread.php?t=527036"
echo "run at your own risk."
echo "If the date below is in Standard time (ie CST) continue."
echo "If it is in Daylight time (ie CDT) exit program"
date -d '27 March'
echo "<CTRL> C to Break <ENTER> to Continue"
read akey
mkdir /root/tz
cd /root/tz
echo " "
if [ ! -e "/bin/ksh" ] ;
then
ln -s /bin/bash /bin/ksh
fi
if [ ! -e "/bin/nawk" ] ;
then
ln -s /bin/awk /bin/nawk
fi
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
tar xvzf /root/tz/tzcode2007c.tar.gz
tar xvzf /root/tz/tzdata2007c.tar.gz
pwd
echo "Compiling files needed for update. Press <ENTER> to continue"
read akey
make install
echo " "
echo "**************"
echo "Second check. If date is March 11, 2007 QUIT if April 1, 2007 continue"
zdump -v America/Chicago | grep 2007
echo "<CTRL> C to Break <ENTER> to Continue"
read akey
./tzselect
mkdir /tmp/zoneinfo
cd /tmp/zoneinfo
tar xvzf /root/tz/tzdata2007c.tar.gz
echo "Creating temporary zone files"
/root/tz/zic -d /tmp/zoneinfo northamerica
cd /usr/share/
mv zoneinfo zoneinfo.old
mv /tmp/zoneinfo .
rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
echo "Check to see if update took. Should now read March 11 2007"
zdump -v America/Chicago | grep 2007
echo " "
echo "If the date below is CDT it worked and you are done. If it is in CST the update did not work."
date -d '27 March'
 
Old 03-10-2007, 01:29 PM   #56
pratul
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
jlightner : Do you have zic on those old machine

I suggest compiling zone files manually and then place it on old servers in /usr/share/zoneinfo and relink the /etc/localtime.

I have seen that for old versions of linux (6/7/9), my process defined earlier using "zic" works better and it is simple than thinking about updating zdata package/RPM etc.






Quote:
Originally Posted by jlightner
Does 6 have an /etc/localtime?

If so did you copy the compiled file over /etc/localtime then run:
zdump -v /etc/localtime |grep 2007 ?
 
Old 03-10-2007, 04:18 PM   #57
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
The oldest Linux I had was RedHat 7.3 (in Linux). The compile and link (actually copy) is what I did. I did the copy because the existing /etc/localtime was a copy rather than a link (typically a copy of /usr/share/zoneinfo/America/New_York because I'm in the Easter timezone).

For some odd reasons EST5EDT is NOT the same as America/New_York for the new bundle but was back in 7.3.

My question to the poster was asking if he had remembered to put in a new /etc/localtime (link or copy) when he had done the zone file.

When I said "compile" I of course meant "zic" (zone info compile).

However I don't have RH 6 so I asked if /etc/localtime existed then because I don't know. While /etc/localtime also exists on my FreeBSD UNIX systems it does NOT exist on HP-UX or SCO UNIX so there is a different fix for those. It therefore seems possible to me that early Linux may have done it differently.

Interestingly though - why not just go ahead and zic all the files that come in the bundle to update all zone files? I wrote a script once when I was supporting sites in multiple countries where I relied on zone files for those countries - not just /etc/localtime. If anyone really is afraid the zone files may be needed later they could just save all of /usr/share/zoneinfo before the compiles.
tar cvf zoneinfo.pre2007.tar /usr/share/zoneinfo
 
Old 03-11-2007, 12:45 AM   #58
findanisp
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
It's a bit late to ask this - but does changing the time zone files require rebooting the computer to pick up the change?

I guess I'll find out in 15 minutes...
 
Old 03-11-2007, 03:14 AM   #59
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Rebooting isn't mandatory but a good idea. Some processes may get their timezone information on start and not check again. By rebooting you insure all processes are using the new timezone info.
 
Old 03-11-2007, 03:18 AM   #60
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,973
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
The World Didn't End

Amazing all of my UNIX/Linux systems successfully transitioned to the new EDT without a problem AND my lights and cable are still on.
Hell even my unsupported SCO (I know) UNIX box’ bizarre fix for unsupported version worked as did my unsupported HP-UX 10.20 servers.

If only I could have figured out how to automatically change the dam AS400 times I wouldn’t have even had to have gotten up tonight.

Interesting that the media waited so long to start hyping on the potential for issues. I'm sure they'll do as they did after Y2K and complain about how the IT industry led them astray when the world didn't end and ignored the amount of effort that went into insuring everything was compliant ahead of time. Not that I knew anyone in IT who even bothered to stockpile food and water like the nuts were doing. Ah well I guess now they can go back to the Anna Nicole Smith story - apparently she's still dead.
 
  


Reply

Tags
dst


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning Off Daylight Savings Time troy.porter Red Hat 1 03-10-2007 12:02 PM
Server time and daylight savings dtra Linux - General 2 03-23-2006 04:10 PM
Daylight Savings time depdiver Linux - General 4 03-13-2006 01:30 PM
Daylight savings time depdiver Red Hat 2 02-21-2006 10:00 AM
Daylight savings time Jeebizz Slackware 13 11-21-2005 08:08 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration