Log in

No account? Create an account

Previous Entry | Next Entry

Time Enough

Well, that was opaque. I just got through updating the timezone definitions on two of my Linux boxes. Courtesy of the Energy Policy Act of 2005 the US has new dates for shifting in and out of Daylight Savings Time. Meaning that every computer system in North America that has the capability to automatically adjust itself for ST/DST needs to be updated.*

I knew that there were timezone files on the system, and that they were some compiled version of source text files. I also knew that there was some link in /etc that told the system which timezone it was in. Searching Slackware's site for packages that deal with time got me a link to the site where glibc (Linux's C language library of functions) draws its timezone definitions from. That got me a pair of archives with raw source files and clear if already understood instructions on installing them.

Slowly the light dawned and I figured out that I just needed to invoke the timezone source file compiler (zic - already on the system) to compile a named file. Because there is an agreed upon standard for where to put compiled timezone files (/usr/share/zoneinfo), zic already knew where to put its output. On the older Slackware box there was a symbolic link in /etc (/etc/localtime) pointing to the right file down in /usr/share/zoneinfo/; that I re-made pointing to the updated file. On the newer box it looked like the installer copied the file out of /usr/share/zoneinfo/ and to /etc/localtime; easy enough to do manually.

Then I tested. The older box is my local NTP (Network Time Protocol) server, so I wasn't effing around with it. The newer box is 'just' a web server, so it got to be my guinea pig. I stopped Apache and Sendmail (as well as commenting out most of the jobs in cron) and advanced the time. I first told Solstice that it was 3/10 23:59 and let the time advance to 3/11 00:01 ... no change to the time. Oh, yeah, we do the shift at 2:00 AM! I advanced the time to 01:59 and waited. Zot! after sixty seconds the time jumped to 03:00 and the TZ changed from EDT to EST! Victory! I changed the time back and started all of the demons and cron jobs back up.

Now I just have to do this on a bunch more servers at home and at work:

Alas, the process for updating Windows 2000 machines looks far worse. Technically it's doing the same thing -- installing a new map of timezones into the OS -- but it's Microsoft so it involves arcane scripts and deep registry diving. I only have to deal with personal machines here, but that list numbers six at home plus another five if I add in my mom, my in-laws, brianrogers and elizabethbear. I suppose that poor Wingnut (my legacy Windows 95 laptop) is just hosed when it comes to the new timezone info.

Now, however, it is time for bed.

* "Computer System" in this case means any digital device with a clock and an automatic ST/DST adjusting function ... from digital clock thermostats to routers, PCs to multi-function fax/copiers. Mind you, the same government which brought us this act -- with virtually no consideration of the collateral effects -- is pushing to eliminate leap seconds from UTC (coordinated universal time) because dealing with them is too complicated. On hand clearly does not know what the other is doing.


( 11 comments — Leave a comment )
Mar. 2nd, 2007 04:44 am (UTC)
To check that it worked, you should be able to use zdump rather than changing the system clock.
Mar. 2nd, 2007 04:53 am (UTC)
zdump did tell me that the new file was correct, but I wanted 'proof positive'. :-)

I also hadn't found anything that indicated whether the tz info was read by the system at boot or checked all the time. Fiddling with the time answered that question as well (no reboot needed -- the kernel time-keeping mechanism must check the TZ file periodically).

How's your shop set for the upcoming change? At work I have this nasty feeling that I may be the only one tracking this thing.
Mar. 4th, 2007 11:46 pm (UTC)
We're in pretty good shape. The desktops are XP or Mac OS X 10.4 and patched, the blades are current, and even the few crufty Alphas are OK because DigiCompaHP is still supporting Tru64 with patch kits.

We did have a full "okay, what do we need to check" meeting session, but I'm sure we'll find something minor we've forgotten.
Mar. 5th, 2007 09:28 pm (UTC)
My counterparts in the server and desktop groups had that meeting today ... there are a bunch of legacy machines (win2k) they need to work on, plus pushing patches for Outlook. Should be a fun morning on the 12th, seeing what my Lookout Outlook calendar looks like!
Mar. 2nd, 2007 11:47 am (UTC)
Rest of us mortals???
So the shrub and others
set it up so computers need to have, in the US a oddball TimeZone set??
so what could happen to the rest of us
Mar. 2nd, 2007 07:25 pm (UTC)
Re: Rest of us mortals???
Hey, the Canadians followed us right over the cliff -- we're not alone!

Actually, timezone parameters change all the time. Some countries in South America and Africe, I now understand, don't have a fixed scheme for entering and exiting DST ... kind of like Thanksgiving in the US prior to it's being fixed at the 4th Thursday in November; the date was set each year by the President. So, in a sense, we're spoiled by having never had to do this before in the digital age!

If you have Win2k machines at home let me know and I will email you the fix files (a .reg and a .vbs that you run to load a new timezone database and put it into play).
Mar. 2nd, 2007 01:20 pm (UTC)
I was definately not paying attention
I was listening to our IT guy at the library, go through this and it never even occured to me that me and my laptop are affected by this...Until I sit here reading your fun while staring at my laptop! Oh, fun for me.

Well, I have been thinking that my tax refund might make a nice computer. :)
Mar. 2nd, 2007 07:28 pm (UTC)
Re: I was definately not paying attention
Thanks to Mark-my-unindicted-co-conspirator, the update is pretty painless if you're still running Win2k. He digested Microsoft's instructions down into two script files that you run. If you'd like I can email them to you w/instructions. If you're running Win9x, you're hosed ... at least for three weeks in March and a week in October.
Mar. 2nd, 2007 09:45 pm (UTC)
Re: I was definately not paying attention
I've got the home WinXP edition. What's that do for me?
Mar. 3rd, 2007 03:16 am (UTC)
Re: I was definately not paying attention
Question -- have you installed Service Pack 2?

If you don't know, you can check by doing: start -> run -> winver. The winver utility will tell you several useful pieces of information about your installation of Windows, including your SP level.

If the anwswer is yes, and you have automatic updates turned on, you're already fine. If you have SP2 but not automatic updates, then manually go to Windows Update and install all of the critical updates. This will get you the TZ fix.

If the answer is no, install SP2 and then run Windows Update. If you need a copy of SP2, let me know.
Mar. 3rd, 2007 12:30 pm (UTC)
Re: I was definately not paying attention
Thanks! I've got SP2 and auto updates on, So, I'm good. Thank you!
( 11 comments — Leave a comment )

Latest Month

January 2017


Powered by LiveJournal.com
Designed by Lilia Ahner