LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-30-2005, 07:10 PM   #1
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 478

Rep: Reputation: 30
Daylight Savings Time and Linux


Hey all,

I just have a question about daylight savings time and linux. Well for people who live in the United States and Ontario Canada, come 2007, they are switching the daylight saving times from October to November or something like that. I am wondering will linux support that in the future? Does anybody know what controls that like is it a kernel thing or is it a script somewhere or something?
I am needing to know because all the computers in the data center I oversee are all based off of Slack. I need them to work because over 2000 people log into servers in my center. They are all restricted to log in at certain times and I can't have this differant daylight savings time messing anything up. If I need to upgrade all servers then so be it but I would like to know what accually controlls it.

If anybody knows, please help me out thanks.

Last edited by cereal83; 10-30-2005 at 07:11 PM.
 
Old 10-30-2005, 07:33 PM   #2
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
good question- I'm really not sure about this, ( 1) my linux died and 2) I don't live in a DLS area) but I seem to remember a "daylight savings" option. You could always manualy crank the clocks forward/back or even get the time from a time server.
Oohh.. you sound like you have users from DLS and nonDLS areas- ouch. maybe a script to check if they are from a DLS area and "reset" their hours?

titanium_geek
 
Old 10-30-2005, 09:38 PM   #3
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 52
This will not be a problem.

glibc-zoneinfo is the Slackware package that contains the information about how each time zone works (when/if it changes to/from daylight savings time and when.)

When the time comes, at most you'll have to upgrade to the latest glibc-zoneinfo package.

Lyle.
 
Old 10-30-2005, 09:48 PM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Linux should be able to cope fine with it. My clock just changed on its own yesterday from BST to GMT.
 
Old 10-31-2005, 07:43 AM   #5
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 478

Original Poster
Rep: Reputation: 30
Thanks for all the answers guys.

All my servers also changed time with no problems but if we have to upgrade a package, that might be an issue. We still have servers running Slack 7,8,9 and I don't know if you will just be able to upgrade 1 package on the server. It seems like I might have to upgrade all the old servers which is gonna take some time but won't be an issue. I will look more into that file that controls the daylight savings times. Any other imput would be great.

Thanks
 
Old 10-31-2005, 08:06 AM   #6
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
Hmm... my clock never changes by itself. But it only happened every 6 months, so I never get around to finding out how to make it work properly
 
Old 10-31-2005, 05:28 PM   #7
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Settings for daylight saving appear to be stored in binary form in the file pointed to by the symbolic link /etc/localtime (on Debian anyway, on another distro I see /etc/localtime already contains the binary data). In my case the actual binary file is

/usr/share/zoneinfo/Australia/Sydney

The page http://www.twinsun.com/tz/tz-link.htm gives some explanation of where this stuff comes from. I looked at the TZ database referenced there and it already has the recently announced one-off daylight saving extension for the 2006 Commonwealth Games in Melbourne. I'm not sure how fast this propagates into new linux distributions. I guess you can DIY by building the 'compiler' to turn the human-readable timezone data in the database into the binary file for your timezone.

I have a feeling older UNIX systems may have used a simpler mechanism using numerical info in /etc/timezone, which now just contains the name of the the time zone, if it exists at all.

Hi 1+1=2:

Are you set to UTC or local time? On a Debian system this is set by a line in /etc/defaults/rcS. All time related stuff works much better on UTC - especially daylight saving, using ntp to set the clock accurately, logging in from a different timezone or moving your computer across time zones.

There is a good guide (Debian specific, but lots of general info also) here

http://www.debian.org/doc/manuals/sy...dmin-time.html

Update:

I had a closer look at the timezone info and created a new binary file for my zone. Just download the tzdata and tzcode files, unpack them into a new empty directory and run 'make'.

This gives (among other stuff) an executable 'zic'. Running this on the (human-readable) australasia data file gives several new directories with binary zoneinfo files, including Australia/Sydney. Command 'zic -d . australasia' generates these in the current directory. Result was same size as original but 4 bytes were different.

So it looks like you can update your zoneinfo with something like

zic -d <your zoneinfo dir> australasia

(as root, and with your region data file). Maybe I should reboot sometime between now and the Commonwealth Games

Last edited by maroonbaboon; 10-31-2005 at 07:47 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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling auto conversion to daylight savings time Saxton Linux - General 3 02-12-2009 08:13 AM
Turning Off Daylight Savings Time troy.porter Red Hat 1 03-10-2007 12:02 PM
Daylight savings time Jeebizz Slackware 13 11-21-2005 08:08 PM
NTP and Daylight Savings Time jrdioko Linux - Software 8 11-01-2005 09:25 AM
Daylight savings time Problem bogus__13 Linux - General 1 04-04-2005 10:09 PM


All times are GMT -5. The time now is 09:27 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