netcurmudgeon (netcurmudgeon) wrote,
netcurmudgeon
netcurmudgeon

  • Mood:
  • Music:

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:
alpha
beta
hedwig2
hm-lnx-nms01
hm-lnx-nms02
hm-lnx-noss01
ns1
ns2
ns3
pm-lnx-squid01
solstice
wixer

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.
Tags: linux, timezone, windows
Subscribe

  • It's that time again...

    It's double bonus time for us right now: budget season and E-Rate season. In a time of budget crisis and ever shrinking resources, we (the IT…

  • My life...

    ...for the past three weeks, has been eaten by BTOP -- The Broadband Technology Opportunity Program grant. Hartford is applying. Time from the…

  • E-Rate, how I love thee. Let me count the ways...

    Sent by me to our E-Rate consultants today under the heading FYI... E-Rate administrative burden: Jane & Debi; Just a data point for you if you…

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 11 comments

  • It's that time again...

    It's double bonus time for us right now: budget season and E-Rate season. In a time of budget crisis and ever shrinking resources, we (the IT…

  • My life...

    ...for the past three weeks, has been eaten by BTOP -- The Broadband Technology Opportunity Program grant. Hartford is applying. Time from the…

  • E-Rate, how I love thee. Let me count the ways...

    Sent by me to our E-Rate consultants today under the heading FYI... E-Rate administrative burden: Jane & Debi; Just a data point for you if you…