LinuxQuestions.org
Visit Jeremy's Blog.
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 02-06-2007, 04:08 PM   #16
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755

The version determines whether it has the right TZ stuff. If it is before a certain version (1.4.2.12 I think) then it doesn't unless you've fixed it.

You can use Sun's (Java's) tzupdater to fix any 1.4.x version of Java. For 1.3 you have to upgrade to 1.3.1-18 (I think that's it - check the Sun web site). You should do a find from root to be sure you've found all the Java versions you're using - some applications install JRE or JDK as part of their own install.
 
Old 02-07-2007, 12:07 PM   #17
edodd
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by Brydon
I went to http://www.twinsun.com/tz/tz-link.htm and downloaded tzdata2006p.tar.gz. I un-tared this file into a temp directory and executed
I'm now wondering (again) if I'm completely insane. I downloaded the latest file from ftp://elsie.nci.nih.gov/pub/, which was tzdata2007a.tar.gz, but when I zdump it, I see

Code:
# zdump -v America/New_York | grep 2007
America/New_York  Sun Apr  1 06:59:59 2007 UTC = Sun Apr  1 01:59:59 2007 EST isdst=0 gmtoff=-18000
America/New_York  Sun Apr  1 07:00:00 2007 UTC = Sun Apr  1 03:00:00 2007 EDT isdst=1 gmtoff=-14400
America/New_York  Sun Oct 28 05:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 EDT isdst=1 gmtoff=-14400
America/New_York  Sun Oct 28 06:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 EST isdst=0 gmtoff=-18000
Is there a more current version of this file? Should I really use last year's version?
 
Old 02-08-2007, 11:33 AM   #18
laggerific
Member
 
Registered: Jan 2006
Posts: 65

Rep: Reputation: 15
edodd...I'm getting the same thing...

When I zdump -v PST8PDT I still have the april 1st date.

Anyone able to get the tzdata2007a.tar.gz to work? Is there another place to get older release to test against, make sure we're not doing anything wrong? I mean, it's pretty straight forward, but why would we not be able to build the proper files with that tzdata.

Last edited by laggerific; 02-08-2007 at 02:32 PM.
 
Old 02-09-2007, 08:23 AM   #19
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
I found it on google search.

http://public.www.planetmirror.com/p...ta2006p.tar.gz
 
Old 02-09-2007, 10:05 AM   #20
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
Quote:
Originally Posted by edodd
I'm now wondering (again) if I'm completely insane. I downloaded the latest file from ftp://elsie.nci.nih.gov/pub/, which was tzdata2007a.tar.gz, but when I zdump it, I see

Code:
# zdump -v America/New_York | grep 2007
America/New_York  Sun Apr  1 06:59:59 2007 UTC = Sun Apr  1 01:59:59 2007 EST isdst=0 gmtoff=-18000
America/New_York  Sun Apr  1 07:00:00 2007 UTC = Sun Apr  1 03:00:00 2007 EDT isdst=1 gmtoff=-14400
America/New_York  Sun Oct 28 05:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 EDT isdst=1 gmtoff=-14400
America/New_York  Sun Oct 28 06:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 EST isdst=0 gmtoff=-18000
Is there a more current version of this file? Should I really use last year's version?
I had similar problems. I found that you have put in the full path
on the compile:

zic -d /root/dst/zoneinfo northamerica

zdump -v EST5EDT |grep 2007
EST5EDT Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0 gmtoff=-18000
EST5EDT Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDT isdst=1 gmtoff=-14400
EST5EDT Sun Nov 4 05:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 EDT isdst=1 gmtoff=-14400
EST5EDT Sun Nov 4 06:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 EST isdst=0 gmtoff=-18000
 
Old 02-09-2007, 01:59 PM   #21
laggerific
Member
 
Registered: Jan 2006
Posts: 65

Rep: Reputation: 15
I tried the file you linked and received the same results. I am not sure what I am doing wrong. I've tried the following:


sudo zic -d /tmp/tzupdate/ /tmp/tzupdate/northamerica

Anyone notice any issues with that?
 
Old 02-09-2007, 02:24 PM   #22
bic
Member
 
Registered: Jan 2005
Distribution: MythDora 3.2, RHEL 6.3
Posts: 95

Rep: Reputation: 16
Quote:
Originally Posted by laggerific
I tried the file you linked and received the same results. I am not sure what I am doing wrong. I've tried the following:


sudo zic -d /tmp/tzupdate/ /tmp/tzupdate/northamerica

Anyone notice any issues with that?

remove last slash so it's just /tmp/tzupdate
 
Old 02-09-2007, 05:21 PM   #23
laggerific
Member
 
Registered: Jan 2006
Posts: 65

Rep: Reputation: 15
Quote:
Originally Posted by bic
remove last slash so it's just /tmp/tzupdate

Still the same results running: zdump -v PST8PDT | grep 2007

Is there any reason I couldn't take a working copy of the PST8PDT from one of our more recent systems and use it on 7.3?

Okay...so I was misunderstanding the function of zdump...it doesn't pull it from any general file you specify...it is still pulling it from /etc/localtime...I thought I was specifying a file I wanted it to check before I updated /etc/localtime to link to it...

Perhaps...still not sure on that.

Last edited by laggerific; 02-09-2007 at 05:47 PM.
 
Old 02-15-2007, 11:46 AM   #24
jordanlund
LQ Newbie
 
Registered: Feb 2007
Posts: 1

Rep: Reputation: 0
I had the same problem with PST8PDT but the good news is the file is fine. The problem appears to be the ln command.

#zdump -v /etc/localtime | grep 2007

- Showed bad info.

# zic -d /tmp/zoneinfo northamerica

- Copied the PST8PDT to /usr/share/zoneinfo

# zdump -v /usr/share/zoneinfo/PST8PDT | grep 2007

- Showed good info.

{{ # ln -fs /etc/localtime /usr/share/zoneinfo/PST8PDT}}

- This is the bit that's backwards. It's linking the bad localtime file over-top of the good PST8PDT. Reverse it to:

# ln -fs /usr/share/zoneinfo/PST8PDT /etc/localtime

- Now when you do this:

# zdump -v /etc/localtime | grep 2007

You should get:

/etc/localtime Sun Mar 11 09:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 PST isdst=0 gmtoff=-28800
/etc/localtime Sun Mar 11 10:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 PDT isdst=1 gmtoff=-25200
/etc/localtime Sun Nov 4 08:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 PDT isdst=1 gmtoff=-25200
/etc/localtime Sun Nov 4 09:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 PST isdst=0 gmtoff=-28800
 
Old 02-15-2007, 07:02 PM   #25
ddzc
Member
 
Registered: Oct 2003
Location: T.O
Distribution: SunOS 10
Posts: 97

Rep: Reputation: 15
I was having the same problem

jordanlund's method of reversing the ln -fs command did the trick.

Brydon, did the command you posted work for you somehow?


Have you guys tried to test it out? I changed my date to March 11 and the time went back 1 hour instead of forward. When I changed it to March 9 or 10, it goes forward an hour.

Something is screwed up...

Last edited by ddzc; 02-15-2007 at 07:23 PM.
 
Old 02-15-2007, 08:45 PM   #26
ddzc
Member
 
Registered: Oct 2003
Location: T.O
Distribution: SunOS 10
Posts: 97

Rep: Reputation: 15
Guys, I tried this update on a linux test box I have ( Redhat)

It's showing the correct numbers when I execute: zdump -v /etc/localtime | grep 2007

I was having the above issue before. I reinstalled the OS and tried it over again.

I did the update again and the time is all crazy now. It was showing 7PM. I rebooted the machine and it was 2PM. I rebooted again and it was 9AM. It keeps going back 5 hours. Not sure what the heck is wrong with this update but i'm going to try a different distro on my test box.
 
Old 02-16-2007, 07:23 AM   #27
findanisp
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Confirming that the original symbolic link instructions were backwards, and if you follow them, you will clobber the "good" file in /usr/share/zoneinfo/... (any wayto edit the old post as this is likely to become a very popular topic and others will have the same problem)

[change of topic]
Is there a reason to not just expand the zoneinfo (including all the subdirectories) directly over the /usr/share/zoneinfo/* tree rather than manually selecting the relevant files? (not everyone lives in Montreal).

Are there going to be any issues if you do this install of the tzdata update but don't also recompile glibc? (glibc-common-2.2.4-32.25)

I'm getting very nervous about winding up with a cascade of required prerequisites that is going to wind up with a completely broken server..
 
Old 02-16-2007, 09:52 AM   #28
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
The RedHat site gives updating tzdata WITHOUT installing new glibc-common update an acceptable work around. My read is that the later glibc-common is designed to automatically update /etc/localtime when it sees tzdata updated. With the earlier versions of glibc-common you have to manually update /etc/localtime.

This link (for RH AS 3) gives options on which way to update the OS.
http://kbase.redhat.com/faq/FAQ_79_9950

It doesn't mention Java by the way - as a reminder you still have to do Java updates in addition to the OS updates.

I just did the workaround on my test systems yesterday and ran the tzdupdater for our Java 1.4.2-08 and upgraded the 1.3.x Java to 1.3.1-19 on our test systems yesterday. It was fairly painless.
 
Old 02-16-2007, 04:39 PM   #29
AndrewPoon
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
zdump shows correct info but testing failed.

Anyway tried updating the tzdata on Slackware 7.2?

We have an old box. We updated the zoneinfo. zdump shows the correct data, /etc/localtime had been copied. However, testing using Perl failed.

I had use the similar method for RedHat/Old-Solaris boxes and all works fine. Seems slackware is caching some data somewhere. Is that the glibc stuff?

# zdump -v /usr/share/zoneinfo/Canada/Eastern | grep 2007
/usr/share/zoneinfo/Canada/Eastern Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0 gmtoff=-18000
/usr/share/zoneinfo/Canada/Eastern Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDT isdst=1 gmtoff=-14400
/usr/share/zoneinfo/Canada/Eastern Sun Nov 4 05:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 EDT isdst=1 gmtoff=-14400
/usr/share/zoneinfo/Canada/Eastern Sun Nov 4 06:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 EST isdst=0 gmtoff=-18000

# ls -l /etc/localtime
lrwxrwxrwx 1 root root 34 Feb 16 17:30 /etc/localtime -> /usr/share/zoneinfo/Canada/Eastern

# ./testdst
EST
EST
**** Error ****** timezones standard/daylight saving time don't test out okay
# cat testdst
#!/usr/bin/perl

use POSIX qw/mktime strftime/;

$before = mktime( 59, 59, 1, 11, 2, 107 );
$after = $before + 1;

$s_before = localtime( $before );
$s_after = localtime( $after );
$zone_before = strftime "%Z", localtime( $before );
$zone_after = strftime "%Z", localtime( $after );
print "$zone_before\n";
print "$zone_after\n";
if( $zone_before ne $zone_after ) {
print "timezones standard/daylight saving time test out okay\n";
}
else {
print "**** Error ****** timezones standard/daylight saving time don't test out okay\n";
}
 
Old 02-16-2007, 07:00 PM   #30
pratul
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
Cool Definitive guide to update DST 2007 on RHEL systems

UPDATE : Many of you asked for a simple process which works on all older linux systems (7.1 / 7.2 etc.) So here is a simple and easy process which is universal. Read the remaining guide for knowledge and when this is not a solution for you.:
**************************************************************************

ELEGANT / SIMPLE PROCESS to UPDATE DST 2007 on all Linux Servers :

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

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



Hi,

Please visit the following link I provided for practical information about the Linux DST update for a basic linux sysadmin (I mean not a fundu one...just average Admin).

http://s95078055.onlinehome.us/DST_R...7_Process.html

for your interest, I am also pasting the text below, howvwer it is a good idea if you visit the page, especially if you want to access the file links:

**********************************************************
Procedure to Update Daylight Saving Time on Red hat Linux Enterprise Server 3 (RHEL 3): - Prepared by Pratul PRATULatHOTMAILdotCOM and my Time zone is America/Los_Angeles



DISCLAIMER: These procedures and files worked fine for my systems according to my knowledge. Please use any or all of these procedures and files only at your RISK. I am providing these instructions and files to share my experience with user community and they are not intended to be used as a tested and reliable procedure or files. By using/following this document further, you are agreeing that I may not be held responsible for any damage your server and systems suffer because of these instructions or files.



As you all must know by this time that the Daylight Saving time in USA is changed. Previously it was supposes to be kicked in on Apr 1st and fall back on Oct28. However, now it is kicking in early on March11, 2007 01:59:59 AM and it will fall back late on Nov 4th 2007 01:59:59 AM.



Obviously, You must have had meetings with your boss about this and many of you must have already patched your servers. If you have RHN subscription, then it is easy to manage this patch. If you do not have one, like me, and running RHEL3, then you may follow these simple instructions to get out of this trouble much easier than your manager thought you would be. Please note that these instructions may also provide knowledge to update other Linux systems, which are not RHEL3. Please also note that this is a common knowledge that you need the new adjusted time zone files, even if you sync time with some ntp server. So do not remain in denial that since you are running ntpd, you are good.



1. First test your present servers, if miraculously they are already fixed and you do not need any updates by doing following:



# zdump -v /etc/localtime | grep 2007



Output looks like below if system is not fixed (most likely if you are reading this):



CST6CDT Sun Apr 1 07:59:59 2007 UTC = Sun Apr 1 01:59:59 2007 CST isdst=0 mtoff=-21600

CST6CDT Sun Apr 1 08:00:00 2007 UTC = Sun Apr 1 03:00:00 2007 CST isdst=0 mtoff=-18000

CST6CDT Sun Oct 28 06:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 CST isdst=0 gmtoff=-18000

CST6CDT Sun Oct 28 07:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 CST isdst=0 gmtoff=-21600



If you saw above, you need to take further actions to fix the time zone file to reflect the correct March and Nov settings.



However, if you are luckier than me, you may see an output like following and that will confirm that zone files are fixed and you do not need any new time zone file:



CST6CDT Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0 gmtoff=-21600

CST6CDT Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CST isdst=0 gmtoff=-18600

CST6CDT Sun Nov 4 06:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 CST isdst=0 gmtoff=-18600

CST6CDT Sun Nov 4 07:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 CST isdst=0 gmtoff=-21600



2. You need to collect some information about your Linux Server. Make an excel sheet for multiple servers and keep everything together with server names. Mine looked like following (on most servers): [by command: “cat /proc/version” ]



Linux Version: Red Hat Linux 3.2.3-42

Kernel Version: 2.4.21-20.Elsmp

GCC Version: 3.2.3 20030502

TZDATA Version: tzdata-2004b-1.EL [ by command “rpm –qa|grep tzdata”

Output of zdump checked – FIXED or Not FIXED

Date the fix will be applied:

Person who will apply the fix: mostly it is you….too bad



Theory: You need to have a fixed time zone file according to your time zone

(you know your time zone for sure by looking into “cat /etc/sysconfig/clock” file ) .



Place it at most likely directory ( may be /usr/share/zoneinfo ) then relink your /etc/localtime file to point to this fixed time zone file by issuing command like this :



“ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime”



Practical:

You have several choices to get these modified time zone files onto your system.



1A. Install the already compiled rpm (“rpm -ivh tzdata-2006m-3.el3.noarch.rpm”) I am providing. If you have a similar system as mine, Installing this rpm will bring all the updated time zone files in the directory /usr/share/zoneinfo) . Then you may simply relink that /etc/localtime to the desired time zone file as described above and test it. Testing will be again described below.



1B. Once you have this time zone file working successfully on one system, copy it over (either this particular file or whole /usr/share/zoneinfo/America directory to other systems at the same location and relink the /etc/ localtime as mentioned above. (refer : ln –sf blah blah blah)



2. If you have a system, which is different, then mine described above, or for different versions of linux, compile the RPM from the source rpm like I had to do and then repeat the 1A and possible 1B for similar systems.



A) I got source rpm from this location: http://fr.rpmfind.net/linux/rpm2html...p?query=tzdata



I downloaded the suitable rpm according to my knowledge as tzdata-2006m-3.el3.src.rpm – 357 KB



B) rpm –ivh tzdata-2006m-3.el3.src.rpm (yes- this is source package)

This installed the source in /usr/src/redhat/SOURCES and installs the spec file in /usr/src/redhat/SPECS . (Note: your directory structures may change- so if you can not find it in above directories, then search for it using “find / -name “tzdata*”



C. Give following command “rpmbuild –bb /usr/src/redhat/SPECS/tzdata.spec”

Assuming that after completing step B, you got the tzdata.spec file created in the specified location. This compiled the source and builds a binary rpm, then placed it in /usr/src/redhat/RPMS/noarch as tzdata-2006m-3.el3.noarch.rpm



D) rpm -ivh tzdata-2006m-3.el3.noarch.rpm

This installs the binary package. Same as section 1A above. Now relink the /etc/localtime to your desired timezone by command

“ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime” and you know that Los_Angeles is my time zone and may not be your necessarily. Refer Theory section above to know about your time zone file.



Good news is that now you have a working binary rpm for your system(s) this procedure can be replicated to all desired servers.



TESTING: you already know the testing of time zone file by zdump –v /etc/localtime |grep 2007 and check the desired output. However, on non-production servers, I also did a rollover test by which I set the local data and time as [date -s "11 MAR 2007 01:59:20"]

And see what happens at next minute. It should move forward to 3 AM next minute.

Similarly, if you set the time like [date -s "04 NOV 2007 01:59:20"], next minute it should move back by 1 hour to 1 AM again.



That concludes my info on Linux DST time change. Enjoy and give me feedback at PRATULatHOTMAILdotCOM.


Download Files:


1. Save the already compiled rpm on my system by right click and “save file as” on this link: My Compiled Binary of tzdata-2006m-3.el3.noarch.rpm


2. To download the source rpm : the Link is mentioned above in section 2A as

http://fr.rpmfind.net/linux/rpm2html...p?query=tzdata

I downloaded the suitable rpm according to my knowledge as tzdata-2006m-3.el3.src.rpm – 357 KB

Last edited by pratul; 03-05-2007 at 05:59 PM.
 
  


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 05:50 PM.

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