LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Time Zone patch (https://www.linuxquestions.org/questions/slackware-14/time-zone-patch-516681/)

H_TeXMeX_H 02-05-2007 07:49 PM

I only know of NTP ... what's wrong with NTP ?

diskoe 02-05-2007 07:50 PM

Well yeah, you can use NTP (ntpdate) in a startup script, such as /etc/rc.d/rc.local

Go here to get a list of time servers, pick one closest to your physical location.

http://ntp.isc.org/bin/view/Servers/WebHome

Hangdog42 02-06-2007 07:10 AM

Quote:

Originally Posted by diskoe
Well yeah, you can use NTP (ntpdate) in a startup script, such as /etc/rc.d/rc.local

Go here to get a list of time servers, pick one closest to your physical location.

http://ntp.isc.org/bin/view/Servers/WebHome

Sorry, wrong answer.


You do NOT want to "pick one closest to your physical location". You DO want to use a pool server. The problem stems from the fact that tons of people link to specific time servers, causing a SERIOUS bandwidth problem and in some cases has resulted in restrictions being placed on specific timeservers. Anybody running a computer for personal use has absolutely no need to link to a specific server, pool servers will work quite nicely and spread the load around.

The link you gave does mention using pool servers, and if you need more information check out http://pool.ntp.org

swampdog2002 02-06-2007 07:44 AM

There's nothing wrong with NTP, I'm sure, but if you're not always connected to the Internet, then how can this update? That's why I was wondering if there were something within Slackware itself that would be able to automatically adjust the time, similar to how Windows does. With Windows 95/98, when Daylight Savings Time came around, when I would initially power up my computer, I would be prompted to accept the new time settings (something that appears to have been removed from later versions of Windows). I was not connected to the Internet, and the time was adjusted accordingly. I was just wondering if there were a way to enable something similar to this in Slackware, not necessarily the prompt, but to take place behind the scenes. Perhaps there is some sort of program available that would do this?

rworkman 02-06-2007 04:55 PM

Quote:

Originally Posted by diskoe
I still think Pat should come out with a patch for Slack 10.2 and older! What gives, Pat? :)

Does anyone bother keeping up with patches after installing?
From http://slackware.osuosl.org/slackwar.../ChangeLog.txt
(see http://slackware.osuosl.org/slackwar...ches/packages/ for the updates)
Tue Aug 22 15:20:32 CDT 2006
patches/packages/glibc-2.3.5-i486-6_slack10.2.tgz: Patched an issue with
kernel version parsing in ld-2.3.5.so that was leading glibc to treat 2.4
kernels with 4 version parts (such as 2.4.33.1) as if they supported NPTL,
leading to a crash at boot.
Added ru_RU.CP1251 locale support.
Updated timezone information from tzdata2006j.
Updated timezone utilities from tzcode2006j.
patches/packages/glibc-i18n-2.3.5-noarch-6_slack10.2.tgz: Rebuilt.
Added ru_RU.CP1251 locale support.
patches/packages/glibc-profile-2.3.5-i486-6_slack10.2.tgz: Recompiled.
patches/packages/glibc-solibs-2.3.5-i486-6_slack10.2.tgz: Patched an issue
with kernel version parsing in ld-2.3.5.so that was leading glibc to treat
2.4 kernels with 4 version parts (such as 2.4.33.1) as if they supported
NPTL, leading to a crash at boot.
patches/packages/glibc-zoneinfo-2.3.5-noarch-6_slack10.2.tgz:
Updated timezone information from tzdata2006j.

diskoe 02-06-2007 08:45 PM

To answer that question, yes. But not by looking at the changelogs. I subscribe to the slackware-security list.

A lot of IT staff in the industry has been scrambling for OS fixes to the government's DST announcement late fall. I was expecting Linux to be no different. From looking at the date in the changelog, I'm surprised that the DST fix was incorporated in August.

I was expecting some sort of message to be sent to the list since December. But it seems it's really a non-issue. Besides, not sure about you, but "Updated timezone information from tzdata2006j" doesn't jump out to me as "Fixed changes to DST start/end dates for 2007".

diskoe 02-06-2007 08:47 PM

Quote:

Originally Posted by Hangdog42
You do NOT want to "pick one closest to your physical location". You DO want to use a pool server.

Cool, learn something new everyday. I've changed my ntp configuration to use ntp pool servers.

iaus10 02-14-2007 10:13 AM

Quote:

Originally Posted by petcherd
It worked on my menagerie of Slack boxen including one as old as SlackWare 7.1

I only wish Windows was this easy.

Did you follow the above steps exactly? I'm not having any luck on Slack 8.1 installs, and in order to have the updates work on a 10.2 box, I needed to install the latest glibc-zoneinfo package... unfortunately, I'm running the most current glibc-zoneinfo for the 8.1 installs. Any ideas? Thanks.


EDIT: Answered my own question. The zic... northamerica command wasn't generating a new "Central" timezone file, to which my /etc/localtime symlink was pointing. Scrolling farther down the list of timeconfig timezones, I was able to choose "Chicago". That file had been updated by the zic command.

Pierre Forget 02-20-2007 06:07 PM

auto update
 
Quote:

Originally Posted by swampdog2002
Just out of curiosity, is it possible to have Slackware update the time automatically, aside from NTP and such? Sort of like how Windows would update the time automatically upon boot-up.

Hi,

In Slackware I use:

/usr/sbin/netdate time.nrc.ca time-nw.nist.gov (from my main server located in Canada)

/usr/sbin/netdate tcp xxx.xxx.xxx.xxx (from my secondary server, where the xxx.xxx.xxx.xxx is the IP of my main server)

Hope this help,

Pierre Forget

Hangdog42 02-21-2007 07:00 AM

Quote:

Originally Posted by Pierre Forget
Hi,

In Slackware I use:

/usr/sbin/netdate time.nrc.ca time-nw.nist.gov (from my main server located in Canada)

/usr/sbin/netdate tcp xxx.xxx.xxx.xxx (from my secondary server, where the xxx.xxx.xxx.xxx is the IP of my main server)

Hope this help,

Pierre Forget

Welcome to LQ!

Now to ask you a favor..... You link directly to a couple of time servers, and unless you have some acute and pressing need to do so, you should be using pool servers. I've got a post earlier in this thread explaining why. Please be a good netizen and change your netdate command.

WilliamS 02-21-2007 03:53 PM

Quote:

Originally Posted by swampdog2002
There's nothing wrong with NTP, I'm sure, but if you're not always connected to the Internet, then how can this update? That's why I was wondering if there were something within Slackware itself that would be able to automatically adjust the time Perhaps there is some sort of program available that would do this?

I created the file /etc/ppp/ip-up , as I'm on dial-up and not connected alll the time, and in it I put:
/usr/sbin/ntpdate ca.pool.ntp.org; /sbin/hwclock -w

so the time is updated every time I connect.

z-man5 02-21-2007 05:44 PM

Pardon me if this wrong place to post this - but I discovered something strange when testing the updated time zones based on info from this thread.

The hardware clock is set to local time and not GMT.

### I set the clock to Nov. 4th, 1:59 AM:
# date 11040159
Sun Nov 4 01:59:00 EDT 2007

### It falls back one hour:

# date
Sun Nov 4 01:00:07 EST 2007

### I reboot the PC and log on.
# date
Sun Nov 4 01:03:37 EDT 2007


When it reaches 2:00 AM it falls back again 1 hour. If I had a cron job to reboot the PC everyday between 1:00 AM and 2:00 AM I guess it would reboot every hour Nov 4th until interrupted?

Is this a penalty for not using GMT time in hardware clock as God intended for Linux?

Thanks!

mcleprechaun 02-28-2007 11:13 AM

Quote:

Originally Posted by diskoe
I still think Pat should come out with a patch for Slack 10.2 and older! What gives, Pat? :)

Try this link.
http://www.slackware.com/lists/archi...nnounce.520840

The GNUinator 03-07-2007 02:40 PM

Upgrading timezone definitions for new DST dates
 
Quote:

Originally Posted by regis_n_bits
You have a couple of options:
1) Upgrade to Slack 11.0
2) Use the "zic" command to generate new timezone files (see the man page for zic).

If you are going to use zic, you'll need the latest timezone rules, which you can get from the latest source code tarball for the glibc library (search the www.gnu.org site). The rules will be in timezone subdirectory.

Or you can get the latest rules from this website http://www.twinsun.com/tz/tz-link.htm . The FTP link will list a file called something like "tzdata2006p.tar.gz", which also contains the complete rules.

Then to generate the latest timezone files for North America you would do something like this:
Code:

# zic -d /tmp/zoneinfo northamerica
After this is done, copy the generated files from "/tmp/zoneinfo" to the "usr/share/zoneinfo" directory, and then run "timeconfig" to select your timezone.

This didn't work for me. Obtained tzdata2007c.tar.gz from elsie.
Followed instructions exactly. After compiling with zic the DST start date for my time zone still showed April 1. Solved the problem for my Vector Linux 5.0 SOHO box by getting a Slackware 10.2 package 'glibc-zoneinfo-2.3.4-noarch-1.tgz and installing that. Ran "timeconfig" and now zdump -v /etc/localtime | grep 2007 shows the correct March 11 start date for DST.

Would someone in this forum get "tzdata2007c.tar.gz" from elsie and see if it works for you?

Thanks,
The GNUinator
running Slackware 11.0, Slackware 10.2, Vector Linux 5.0 SOHO,
and SuSE 9.3 (don't ask why)

WindowBreaker 03-11-2007 11:36 AM

Thanks for the info. Worked like a charm on my Slack 10.2 boxes. I wrote a fully automated script that downloads the timezone data, updates the system, and launches the timeconfig program. I figured it may help some users that need to get it done quickly. I recommend reading thru this short script to understand what it's doing.

The URL is http://www.compugenic.com/tzfix.sh


All times are GMT -5. The time now is 07:20 PM.