LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-30-2006, 12:06 PM   #1
cavladim
LQ Newbie
 
Registered: Sep 2006
Posts: 10

Rep: Reputation: 0
DST patch on RH 7.0


I'm running an older version of RH(2.4.20-28.7) and would like to install a patch for next years DST (daylight savings) any ideas where I can find it?. I can seem to find it in the RH site. Thanks
 
Old 11-01-2006, 06:47 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
That is because Red hat quit supporting RHL7 many years ago...........

use the source tzdata rpm package from Fedora Development;

http://download.fedora.redhat.com/pu...-2.fc6.src.rpm


.
 
Old 11-02-2006, 01:52 PM   #3
cavladim
LQ Newbie
 
Registered: Sep 2006
Posts: 10

Original Poster
Rep: Reputation: 0
dst patch on RH 7.0

Lenard:
Thanks I'll look into it
 
Old 11-02-2006, 01:52 PM   #4
cavladim
LQ Newbie
 
Registered: Sep 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Lenard: Thanks I'll look into it
 
Old 01-13-2007, 12:09 PM   #5
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Here's a general solution (for all flavors of Linux and Unix) if you want to use the new time zone rules. (They were changed in the U.S. and Canada, but not Mexico. This means that San Diego and Tijuana will be an hour off for three weeks in the year. Go figure.)

Here is a recipe for acquiring, building, installing, and testing the
tz distribution on a GNU/Linux or similar host.

mkdir tz
cd tz
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
gzip -dc tzcode*.tar.gz | tar -xf -
gzip -dc tzdata*.tar.gz | tar -xf -

Be sure to read the comments in "Makefile" and make any changes needed
to make things right for your system, especially if you are using some
platform other than GNU/Linux. Then run the following commands,
substituting your desired installation directory for "$HOME/tzdir":

make TOPDIR=$HOME/tzdir install
$HOME/tzdir/etc/zdump -v America/Los_Angeles

To use the new functions, use a "-ltz" option when compiling or linking.
 
Old 01-18-2007, 09:43 AM   #6
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by wjevans_7d1@yahoo.co
Here's a general solution (for all flavors of Linux and Unix) if you want to use the new time zone rules. (They were changed in the U.S. and Canada, but not Mexico. This means that San Diego and Tijuana will be an hour off for three weeks in the year. Go figure.)
Is it acceptable to merely use the new timezone source files and compile them with the existing zic already installed on the system?

Quote:
To use the new functions, use a "-ltz" option when compiling or linking.
Could you explain that a bit? Your explain didn't use that switch. Just where would one use it? (Sorry. It's early and I haven't poured enough coffee into my face yet. )

TIA...

--
rt
 
Old 03-12-2007, 04:13 AM   #7
kimkyong
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by rnturn
Is it acceptable to merely use the new timezone source files and compile them with the existing zic already installed on the system?
I ran the existing zic with -ltz and the timezone src file which seems to have updated things correctly. I'm wondering if I left anything out. We had to scramble a bit yesterday because we were caught napping on a couple of servers no one thought of.
 
Old 03-12-2007, 06:06 AM   #8
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Did you update the /etc/localtime file and verify??

cp /usr/share/zoneinfo/America/Chicago /etc/localtime
zdump -v /etc/localtime | grep 2007

Extra test for verification:

date --date="MAR 25 15:00:00 UTC 2006"
date --date="MAR 25 15:00:00 UTC 2007"
 
Old 03-13-2007, 02:09 AM   #9
kimkyong
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by Lenard
Did you update the /etc/localtime file and verify??

cp /usr/share/zoneinfo/America/Chicago /etc/localtime
zdump -v /etc/localtime | grep 2007

Extra test for verification:

date --date="MAR 25 15:00:00 UTC 2006"
date --date="MAR 25 15:00:00 UTC 2007"
Here's what I get-

/etc/localtime Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0 gmtoff=-18000
/etc/localtime Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Nov 4 05:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Nov 4 06:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 EST isdst=0 gmtoff=-18000

Sat Mar 25 10:00:00 EST 2006
Sun Mar 25 11:00:00 EDT 2007

I did not update /etc/localtime separately but seems to have updated on its own as far as I can tell.

I ran
zic -l ./northamerica
and then ran timeconfig to reset the timezone.

The web applications we run which were off by an hour all day Sunday shows the correct time.
 
Old 03-13-2007, 09:46 AM   #10
cavladim
LQ Newbie
 
Registered: Sep 2006
Posts: 10

Original Poster
Rep: Reputation: 0
dst patch on RH 7.0

Here is the document I came up with a bit late but still

This document covers the steps required to apply the DST (daylight savings time) on a Red Hat 7.3 system
Note: This patch should cover all zones affected by the new daylight savings time correction

mkdir tz
cd tz
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
gzip -dc tzcode*.tar.gz | tar -xf -
gzip -dc tzdata*.tar.gz | tar -xf -

Edit the make file and make any changes pertinent
Run the make in that directory “make TOPDIR=/usr/share/tzdir install”
Run zdump to verify your time changes “zdump –v America/Denver” to verify new time zones
America/Denver Sun Apr 2 09:00:00 2006 UTC = Sun Apr 2 03:00:00 2006 MDT isdst=1 gmtoff=-21600
America/Denver Sun Oct 29 07:59:59 2006 UTC = Sun Oct 29 01:59:59 2006 MDT isdst=1 gmtoff=-21600
America/Denver Sun Oct 29 08:00:00 2006 UTC = Sun Oct 29 01:00:00 2006 MST isdst=0 gmtoff=-25200
America/Denver Sun Mar 11 08:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 MST isdst=0 gmtoff=-25200
America/Denver Sun Mar 11 09:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 MDT isdst=1 gmtoff=-21600
America/Denver Sun Nov 4 07:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 MDT isdst=1 gmtoff=-21600
America/Denver Sun Nov 4 08:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 MST isdst=0 gmtoff=-25200
America/Denver Sun Mar 9 08:59:59 2008 UTC = Sun Mar 9 01:59:59 2008 MST isdst=0 gmtoff=-25200
America/Denver Sun Mar 9 09:00:00 2008 UTC = Sun Mar 9 03:00:00 2008 MDT isdst=1 gmtoff=-21600
America/Denver Sun Nov 2 07:59:59 2008 UTC = Sun Nov 2 01:59:59 2008 MDT isdst=1 gmtoff=-21600
Change to the directory to /usr/share/zoneinfo, here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "Americas" directory.
If you wish, backup the previous timezone configuration by copying it to a different location. Such as `mv /etc/localtime /etc/localtime-old`.
Create a symbolic link from the appropriate time zone to /etc/localtime.
Example: ln -s /usr/share/zoneinfo/America/Denver /etc/localtime
Set the hardware clock by executing: ` /sbin/hwclock --systohc`
Test it by changing the time

Last edited by cavladim; 03-13-2007 at 09:55 AM.
 
Old 03-31-2007, 09:29 AM   #11
synchros
LQ Newbie
 
Registered: Mar 2007
Location: Oak Hill, VA
Distribution: CentOS
Posts: 3

Rep: Reputation: 0
Red Hat 7.2 DST changes

In case anyone else was still confused (as I was until the lightbulb went on this morning), here are yet additional (straightforward, I think) instructions on how to make this change...

I just applied this to a Red Hat 7.2 system I'm trying to retire (yet it just keeps going)...
I did not need to change the Makefile from its defaults. Your mileage may vary. The current package at the time of this posting was tzcode2007d.tar.gz.

The steps of the process:

---begin
cd /tmp
mkdir tz
cd tz
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
gzip -dc tzcode*.tar.gz | tar -xf -
gzip -dc tzdata*.tar.gz | tar -xf -
mkdir /usr/share/tzinfo
make TOPDIR=/usr/share/tzdir install
---end

The package should now be built in /usr/share/tzdir. Check for errors!
If you have none, check that the dates appear to be correct. In this case, I'm looking for my timezone, which corresponds to New_York.

---begin
/usr/share/tzdir/etc/zdump -v /usr/share/tzdir/etc/zoneinfo/America/New_York
---end

Scroll through the output and look for the date changes starting in 2007.

--sample output begin
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Apr 2 06:59:59 2006 UTC = Sun Apr 2 01:59:59 2006 EST isdst=0
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Apr 2 07:00:00 2006 UTC = Sun Apr 2 03:00:00 2006 EDT isdst=1
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Oct 29 05:59:59 2006 UTC = Sun Oct 29 01:59:59 2006 EDT isdst=1
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Oct 29 06:00:00 2006 UTC = Sun Oct 29 01:00:00 2006 EST isdst=0
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDT isdst=1
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Nov 4 05:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 EDT isdst=1
/usr/share/tzdir/etc/zoneinfo/America/New_York Sun Nov 4 06:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 EST isdst=0
--sample output end

On my system (and probably all other "standard" EST5EDT-based RedHat 7.2 systems), /etc/localtime is a soft link to /usr/share/zoneinfo/EST5EDT. I simply deleted the soft link and created a new link to the new timezone definitions. Note the immediately changed times (with the "date" ouput).

---begin
date
rm -f /etc/localtime
ln -s /usr/share/tzdir/etc/zoneinfo/America/New_York /etc/localtime
date
---end

As cavladim indicated, it is a good idea to immediately sync the hardware clock to the (newly updated) system time.

---begin
/sbin/hwclock --systohc
---end

Your Red Hat 7.2 system should now have correct Standard/Daylight Saving transition dates.
 
  


Reply

Tags
dst, redhat



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
Conversion to .DST format ( embroidery ) Relativity Linux - Software 13 02-22-2014 11:10 AM
modification time off 1 hour between linux and windows after DST adjustment pvlogin Linux - Software 3 11-01-2005 09:51 AM
how to exclude DST=255.X.X.X from iptables log file johnnydangerous Fedora 2 04-01-2005 12:19 AM
How to disable DST in RH 9.0?? registering Red Hat 0 04-12-2004 08:20 AM
BUG: dst underflow -- what does that mean? jagmarz Linux - Networking 0 01-17-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration