Daylight Savings Time for 2007
I have several redhat servers I need to get ready for the DST change this year. I have a RedHat RHEL 3 AS server and serveral redhat valhalla distro servers.
I'd like to know how to verify what the current setting is, how to change it, and verify again when I've made the change.
Thanks for any help, hope everyone has a great year!
(my first post...yeah!)
Easiest way to set this up is to just setup ntp or setup a server running ntpd to update your time on your servers. Good place to start possibly after a google search is here: http://www.halley.cc/ed/linux/howto/ntp.html
Welcome to LQ!
I think you will need to install an updated tzdata package. Hopefully, it includes where you are.
In my experience, NTP doesn't take DST into account unless the tzdata tells it to.
I think the question is where to get the updated time zone data or at least how to update it accordingly.
NTP is used to keep time in sync but doesn't set time zones. You need to have appropriate time zone. Time itself is actually set in UTC (GMT) and its the time zone variable that determines how it is displayed for your system
If nothing else one can use zdump to dump the current time zone file, modify it appropriately, and use zic to create the revised one. Of course its the appropriately modifying it that will take some work. Personally I'm hoping there will be updated zone files produced by someone else that can be just installed.
By the way that only changes the OS time zone stuff. Make sure you check for tzupdater for your Java versions from the Java site. Java apparently doesn't use the OS time zone. So far I've seen that HP has issued updates for its HP-UX time zones and believe Sun has for Solaris. I haven't checked RedHat.
So I was following this thread just to see if anyone knew of already updated zone files. If I don't see it by the end of February I'll probably take a stab at it myself. Figured I'd throw out the above for anyone who doesn't want to wait.
Let's see if I can make this a little simple. I have just finished updating my Red Hat 9 servers, Fedora 6 notebook and all my Windoze machines.
Let's start off by clearing up some misconceptions. NTP only sets the UTC time on the computer, the timezone files will display this time in the correct time zone for your region.
Newer, supported distros will have glibc updates ready for the timezone change. Un-supported distros as in Red Hat 9 need a little work.
On my servers, I used
#zdump -v /etc/localtime | grep 2007
to verify the 2007 timezone settings. Mine showed April 1st as the date of change... and not March 11.
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
# zic -d /tmp/zoneinfo northamerica
to compile the timezone data files. I then copied the EST5EDT file to /usr/share/zoneinfo/ directory and America/Montreal file into /usr/share/zoneinfo/America directory. Doing a quick test will make sure these new files are good.
# zdump -v /usr/share/zoneinfo/EST5EDT | grep 2007
# zdump -v /usr/share/zoneinfo/America/Montreal | grep 2007
lastly I linked the localtime file
# ln -fs /etc/localtime /usr/share/zoninfo/EST5EDT
# zdump -v /etc/localtime | grep 2007
the expected output should look a little like thi
/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
Hope this helped.
BTW, If you want to update Windoze,I used tzedit.exe to get this to work.
Thank you, Brydon!
Your post was most helpful in configuring my RH 9 system for the 2007 DST changes. I appreciate your clear explanation very much.
I actually used tzdata2007a.tar.gz from ftp://elsie.nci.nih.gov/pub/
Which tzupdater I need to upgrade the Java to be DST compliant in RHEL AS3/AS4 ? I am lost in that and the time is running out as we are heading to the deadline.
I don't know for sure but if java needs to be updated then update from Sun. As for RH3 / RH4, just update there glib packages.
Correct me if I'm wrong but shouldn't Java get the timezone info from the OS?
Java doesn't get its timezone from the OS. It is supposed to be machine independent so it has its own timezone setup. You need to update Java using the tzupdater from Sun.
Thanks jlightner, you learn something new everyday.
I found this doc from IBM which covers everything regarding the DST change. It explains the totally confusing vague updates provided by redhat.
Problems completing this
I have attempted this fix on two other systems, both Fedora Core 5 machines, and got 100% successful.
However, I am attempting this on a Debian Ubuntu machine, and seems it completely blew up my dst settings..
Now when i take a look at amy local time zone, the following shows:
PS - I'm in NST Newfoundland Time Zone (-3:30)
Newfoundland Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 20:45:52 1901 Newfoundland isdst=0 gmtoff=0
Newfoundland Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 20:45:52 1901 Newfoundland isdst=0 gmtoff=0
Newfoundland Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 03:14:07 2038 Newfoundland isdst=0 gmtoff=0
Newfoundland Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 03:14:07 2038 Newfoundland isdst=0 gmtoff=0
When i check other time zones in Canada, they read the same time... anyone have any ideas?
Ubuntu time changes
Shawn, first of all, if it's Ubuntu, then there's probably already an update from Ubuntu for your time zone. I'd check there first.
Try zdump -v Canada/Newfoundland |grep 2007. If that works for you, then you'll probably want to ensure your time zone is set to Canada/Newfoundland instead of just NST.
I know for me on Debian, the time zone is set to US/Central.
On Debian, zdump -v Canada/Newfoundland |grep 2007 gives me:
Canada/Newfoundland Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600
Canada/Newfoundland Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000
Canada/Newfoundland Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000
Canada/Newfoundland Sun Nov 4 02:31:00 2007 UTC = Sat Nov 3 23:01:00 2007 NST isdst=0 gmtoff=-12600
Of course, I have no idea if that's right, since I've never been to Newfoundland .... :p
Change to DST
Thanks for the info.. Strange thing is if i do zdump and i'm in the dir /usr/share/zoneinfo/Canada
I get that old info
but if i'm somewhere else and type
zdump -v /usr/share/zoneinfo/Canada/Newfoundland
I get the correct info..
weird.. Thanks for your help anyway though..
P.S. If you ever come to newfoundland come in the summer :) too much snow in the winter
Is there something quick and simple to check that the Java is properly updated - similar to checking /etc/localtime? We have Red Hat RHEL AS 3 and 4 servers.
|All times are GMT -5. The time now is 03:27 PM.|