LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-12-2007, 07:15 PM   #1
pueblonative
Member
 
Registered: Jun 2006
Location: Pueblo, Colorado
Distribution: OpenSuse
Posts: 55

Rep: Reputation: 15
Daylight savings time this year


Hi, I just got a report about Daylight savings time this year. Does anybody know the way to fix OpenSuse 10.2 in time, or does it even need fixing?
 
Old 02-12-2007, 08:06 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
The following applies to any Linux distribution.

To find out whether you need to fix anything, do this:

Code:
date -d '27 March'
If it shows daylight time, you're set. If it doesn't, you need to update stuff:

Code:
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 -
Then read the README file and knock yourself out.

Hope this helps.
 
Old 02-12-2007, 08:19 PM   #3
pueblonative
Member
 
Registered: Jun 2006
Location: Pueblo, Colorado
Distribution: OpenSuse
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks.
Quick question: I just set NTP through Yast. Will that help, or do I need to reboot?
And I know this sounds stupid, but hell, you ask and you only sound stupid once. Keep your mouth shut, and you're stupid forever.

Last edited by pueblonative; 02-12-2007 at 08:23 PM.
 
Old 02-13-2007, 05:16 AM   #4
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
NTP won't help with timezone issues. But you don't need to reboot either. As soon as you've installed the new files in the appropriate places (as per the instructions), you're good to go.

Can't help to do another

Code:
date -d '27 March'
when you're done, just as a sanity check. (My sanity, not yours. (grin))
 
Old 02-22-2007, 11:47 AM   #5
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 312

Rep: Reputation: 31
I was about to update my timezome files on my SuSE 9.2 installation. I found directions elsewhere using the following command on the tzdata file contents.

Code:
zic -d /tmp/zoneinfo northamerica
This generated a bunch of things in /tmp/zoneinfo that I understand need to be copied to /usr/share/zoneinfo. However, here's my problem. In /usr/share/zoneinfo I see a directory called Canada and in there is the file Eastern. These correspond to the date and time settings I see in YaST.

How do I create the Canada timezone files?
 
Old 02-23-2007, 08:54 AM   #6
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
The only way I'm familiar with is what I posted above in post #2. That way will generate the Canada timezone files and all the others.
 
Old 02-23-2007, 10:22 AM   #7
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 312

Rep: Reputation: 31
Quote:
Originally Posted by wjevans_7d1@yahoo.co
The only way I'm familiar with is what I posted above in post #2. That way will generate the Canada timezone files and all the others.
Thanks. I am looking at the Makefile and am unsure of a couple things.

Since I want Canada/Eastern as my timezone, should I set both LOCALTIME and POSIXRULES to Canada/Eastern in the Makefile?

I'm a bit confused by TOPDIR. The default in the Makefile is /usr/local and I'm pretty sure I don't want to do that. Even if I set it to something like /usr/local/tzdir I don't know if things will work right. The following is from the Makefile.

Code:
# "Compiled" time zone information is placed in the "TZDIR" directory
# (and subdirectories).
# Use an absolute path name for TZDIR unless you're just testing the software.

TZDIR=          $(TOPDIR)/etc/zoneinfo

# The "tzselect", "zic", and "zdump" commands get installed in. . .

ETCDIR=         $(TOPDIR)/etc

# If you "make INSTALL", the "date" command gets installed in. . .

BINDIR=         $(TOPDIR)/bin

# Manual pages go in subdirectories of. . .

MANDIR=         $(TOPDIR)/man

# Library functions are put in an archive in LIBDIR.

LIBDIR=         $(TOPDIR)/lib
TZLIB=          $(LIBDIR)/libtz.a
If I read this right, everything will be installed under whatever I call TOPDIR. On my system, these things are not under one common directory. For example, I have

Code:
/usr/share/zoneinfo/
/usr/sbin/zic
/usr/sbin/zdump
/bin/date
Should I copy the stuff that gets installed in TOPDIR to other other places on my system?

Perhaps I'm being thick, but I just like to know what I'm doing to my system.
 
Old 02-26-2007, 12:15 PM   #8
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Quote:
Perhaps I'm being thick, but I just like to know what I'm doing to my system.
You're not being thick at all. More people should be as careful as you are.

Sorry about the delay in responding. I've had a software fire to put out at this end.

You don't need to replace any software at all, just the data which the software reads, and only that data which is under /etc/zoneinfo.

So:

Don't mess with LOCALTIME and POSIXRULES.

Under your current working directory (the one in which you'll be doing the make commands), create a new directory called (for example) installed.

Then set TOPDIR to ./installed.

Then compile and "install" everything. After doing that, you'll find something like ./installed/etc/zoneinfo.

As root, while no one else is on the system, do this:

Code:
mv -i /etc/zoneinfo /etc/zoneinfo.old.2007
cp -prd ./installed/etc/zoneinfo /etc/zoneinfo
All your old mechanisms for determing what the local time zone is, and so forth, are not affected by that. So they'll stay the same way they were. As a bonus, if a guest uses your computer and says at the bash prompt:

Code:
export TZ="US/Pacific"
Then he will get Mariposa time, but under the new rules.

Hope this helps.

Last edited by wjevans_7d1@yahoo.co; 02-26-2007 at 12:19 PM.
 
Old 02-26-2007, 06:51 PM   #9
pueblonative
Member
 
Registered: Jun 2006
Location: Pueblo, Colorado
Distribution: OpenSuse
Posts: 55

Original Poster
Rep: Reputation: 15
Just got the automated updates through Zen.
 
Old 02-28-2007, 01:00 PM   #10
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 312

Rep: Reputation: 31
Quote:
Originally Posted by wjevans_7d1@yahoo.co
Hope this helps.
Your posts were VERY helpful. Ironically, I will likely not need to use the information you have provided. The laptop on which SuSE 9.2 is running suddenly started misbehaving on the weekend (weird cooling issues). I will be replacing it and, obviously the OS too.

I've just installed 10.2 on a loaner and its timezone data is current.

Thanks again.
 
Old 02-28-2007, 02:30 PM   #11
dougnc
Member
 
Registered: Apr 2005
Posts: 236

Rep: Reputation: 31
Quote:
Originally Posted by statguy
I was about to update my timezome files on my SuSE 9.2 installation. I found directions elsewhere using the following command on the tzdata file contents.

Code:
zic -d /tmp/zoneinfo northamerica
This generated a bunch of things in /tmp/zoneinfo that I understand need to be copied to /usr/share/zoneinfo. However, here's my problem. In /usr/share/zoneinfo I see a directory called Canada and in there is the file Eastern. These correspond to the date and time settings I see in YaST.

How do I create the Canada timezone files?
So, it looks like I can do this:
Code:
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 -
Then, still in tz, do
Code:
zic -d /tmp/zoneinfo northamerica
Then just
Code:
cp -p /tmp/zoneinfo /usr/share/zoneinfo
I'm running SuSE Linux 9.3.
 
Old 03-02-2007, 10:43 AM   #12
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Quote:
Originally Posted by dougnc
So, it looks like I can do this:
Code:
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 -
Then, still in tz, do
Code:
zic -d /tmp/zoneinfo northamerica
Then just
Code:
cp -p /tmp/zoneinfo /usr/share/zoneinfo
I'm running SuSE Linux 9.3.
I'd be careful about that if I were you. The first step is fine. But the part that you do while "still in tz" should be not

Quote:
Code:
zic -d /tmp/zoneinfo northamerica
Then just
Code:
cp -p /tmp/zoneinfo /usr/share/zoneinfo
but something like

Code:
make TOPDIR=tz1 install
cp -r tz1/etc/zoneinfo /etc/zoneinfo
chmod -r 755 /etc/zoneinfo
This would be less risky and take almost no additional time. It would also provide you with all time zone information for everywhere. That doesn't sound important, and might not be, but you never can tell when you'll need what.
 
Old 03-07-2007, 05:08 AM   #13
dougnc
Member
 
Registered: Apr 2005
Posts: 236

Rep: Reputation: 31
Quote:
Originally Posted by wjevans_7d1@yahoo.co
I'd be careful about that if I were you. The first step is fine. But the part that you do while "still in tz" should be not



but something like

Code:
make TOPDIR=tz1 install
cp -r tz1/etc/zoneinfo /etc/zoneinfo
chmod -r 755 /etc/zoneinfo
This would be less risky and take almost no additional time. It would also provide you with all time zone information for everywhere. That doesn't sound important, and might not be, but you never can tell when you'll need what.
Thank you!. I had to change the cp -r to cp -R and in SuSE 9.3 zoneinfo is in /usr/share, but I got it to work!.
 
Old 03-10-2007, 10:37 AM   #14
gorilla128
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Thanks folks... here's the complete script for your ~/tzupdate.sh. Had to omit zoneinfo from the destdir of the cp command as it was copying to .../zoneinfo/zoneinfo. On 10.1, I had to replace -r with -R for the chmod command.

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 -
make TOPDIR=tz1 install
if (test -d /etc/zoneinfo) then dest=/etc; else dest=/usr/share; fi
cp -R tz1/etc/zoneinfo $dest
chmod -R 755 $dest/zoneinfo
 
Old 03-11-2007, 05:09 PM   #15
leesweet
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Thanks for all the help, but this still isn't working. I've gotten the files, make'd them, cp'd them to /usr/share/zoneinfo on my 9.3 box, and the current time (or even date -d '27 Mar') still returns EST.

I'll reboot for the heck of it, but from what I read here, I shouldn't have to, right?

Edit: Never mind, for some reason, $TIMEZONE's not set. I set that by hand, and it's good. Now to set it by default globally.

Thanks for all the detailed help, and no thanks to Novell for not patching it!

Last edited by leesweet; 03-11-2007 at 05:21 PM.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Daylight Savings Time for 2007 slowgeek Linux - Server 63 03-14-2007 01:01 PM
FC4 and Daylight Savings Time mnauta Fedora 4 02-12-2007 10:13 AM
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 08:23 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