gordon.dewis.ca - Random musings from Gordon


Archive for March 2007


March 25, 2007 @ 12:37 By: gordon Category: General

I went to an IMAX showing of 300 last night.  Though we arrived in advance of the showing, the theatre was mostly full by the time we arrived so we ended up sitting in the second row.  In a normal movie theatre, the second row is considered a bit too close to the screen.  In an IMAX theatre, the second row is waaaaaay too close to the screen.

That having been said, the movie was a reasonably well done, though I found the sheer size of the screen and my closeness to it detracted from my enjoyment of it.  Oh, and people who do not like violent movies should refrain from viewing this movie as their sensibilities will very likely be offended.

Baseball playing goalie

March 22, 2007 @ 23:36 By: gordon Category: Seen on the 'net

Trashy mentioned a blog entry with a short movie about a Canadian goalie who also plays baseball. Enjoy!

It’s a bird! It’s a plane! No, it’s a cruise missle! Or a plane! Or…

March 09, 2007 @ 08:28 By: gordon Category: Seen on the 'net

cruise_missle.pngI came across this article at The Register that has pictures from Google Earth of a cruise missle (maybe) caught in flight over Utah. If you have Google Earth installed, you can view it yourself using this KMZ file.

Comments in the article seem to be divided as to whether it’s a cruise missle or an MD-90 passenger jet.  Either way, it’s still neat.

Daylight saving time and Linux

March 08, 2007 @ 00:58 By: gordon Category: Current affairs

The US Energy Policy Act of 2005 included a section that amended the Uniform Time Act to have daylight saving time start in March rather than April, effective 11 March 2007. Ignoring the fact that it probably will not result in any significant energy savings, in my opinion, it poses some technical challenges for people and companies who have computers. (I’ll write about the energy savings aspect later!)

Though I’ve been running Linux for more than 15 years, I have never given much thought to how the operating system handles timezones. It was all rather blackboxish and just worked. The change in daylight saving time means that it’s suddenly not going to work properly. Fortunately, an article in eWeek addressing this issue caught my eye today. It referenced a Linux-Watch article that had very good instructions for Linux sysadmins.

In a nutshell, Linux (and most other *NIX operating systems) uses a set of files, located in /usr/share/zoneinfo on most systems, that define timezones in excrutiating detail from days of old to the end of the current epoch in 2038. These files are compiled using a tool called zic from text files that have the rules in them. Diehards will probably modify these files by hand to reflect the change for 2007, while the rest of us will go to ftp://elsie.nci.nih.gov/pub/ to download the most recent files.

Before downloading anything, however, you want to check to see if your system is perhaps already aware of the change.

The file /etc/localtime typically holds the timezone information. My old 2.2.34 Slackware system had this as a symbolic link pointing to /usr/share/zoneinfo/Canada/Eastern (because I live in Ottawa), while my Fedora Core 2 system had a copy of the Eastern file in /etc/localtime. Presumably the Fedora system copied the file from /usr/share/zoneinfo/Canada/Eastern as part of the installation process.

To see what’s in the file and determine whether you need to make a change, use the zdump command.

[root@seedling tzdata]# zdump -v /etc/localtime |grep 2007
/etc/localtime Sun Apr 1 06:59:59 2007 UTC = Sun Apr 1 01:59:59 2007 EST isdst=0 gmtoff=-18000
/etc/localtime Sun Apr 1 07:00:00 2007 UTC = Sun Apr 1 03:00:00 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Oct 28 05:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Oct 28 06:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 EST isdst=0 gmtoff=-18000

As you can see, my daylight saving time was set to start at 07:00:00 UTC on April 1st this year. As daylight saving time kicks in on March 11th, this means I need to modify the file.

I then went to ftp://elsie.nci.nih.gov/pub/ and downloaded tzdata2007c.tar.gz and put it in /root/tzdata (you’ll need to create that directory first). Once there, I untar’d it.

Using the zic command, I compiled the new timezone files that applied to me thusly:

[root@seedling tzdata]# zic -d zoneinfo northamerica

This created a zoneinfo directory in my /root/tzdata directory containing compiled versions of the rules. I moved these into /usr/share/zoneinfo using the following command:

[root@seedling tzdata]# cp -vr –reply=yes * /usr/share/zoneinfo

NB: you may not need the –reply=yes depending on your shell settings. seedling is used primarily as my Asterisk server and DHCP server so I don’t spend much time on it and thus haven’t made non-interative my default for cp.

Because seedling, my Fedora Core 2 system, had a static file rather than a symbolic link, I replaced the file with a symbolic link to /usr/share/zoneinfo/Canada/Eastern file. This makes it easier to manage and means that if daylight saving time is switched back to April that I won’t have to worry about forgetting to update /etc/localtime.

[root@seedling tzdata]# mv localtime localtime.ORIG;ln -s /usr/share/zoneinfo/Canada/Eastern localtime

Backups of crucial files are always important, and you can see that I saved the original file just in case it’s needed.

You can confirm that the new daylight saving time start and end dates have taken effect using the zdump command:

[root@seedling etc]# zdump -v /etc/localtime|grep 2007
/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

As you can see, the dates now reflect March rather than April. If you remove the grep, you’ll see the dates from days of old to the end of the epoch in 2038.

Obviously, if you’re following these instructions and you don’t live in Canada’s Eastern timezone, you’ll want to select a more appropriate file.

Impending closure of the Hershey’s plant in Smiths Falls

March 03, 2007 @ 10:50 By: gordon Category: Current affairs

This image from the CBC says it all.  Note the flag at half-mast.If you’re from eastern Ontario, chances are fair that you’ve heard that the Hershey’s plant in Smiths Falls is going to be closed by the parent company, which is based in Hershey, Pennsylvania. Besides making chocolates and candies in Smiths Falls, the Hershey’s plant is the second largest employer in town, employing 500 people. Not only will the closure of the plant result in the loss of these jobs, there will be secondary loses felt by the local companies that supply ingredients, packaging and transportation services to the plant. And then there’s the tourism benefit to the town. Over the years, I have visited the factory on a number of occasions to buy things from the factory store. Usually, I’ll stop in town to buy gas or something to eat, too. With the closure of the factory, trips like mine will be lost so the tourism revenues will be decreased.

As happens often in towns with large employers there are some families that derive 100% of their income from the factory. In Smiths Falls, 54 couples will find themselves without a source of income as a result of the plant closure. Thus, another result of the closure will probably be an increase in the use of welfare services. Some people might even have to leave town altogether to find work elsewhere.

The closure will be particularly hard on Smiths Falls because it’s going to be followed up by the largest employer in Smiths Falls, Rideau Regional Centre, who employees 800 people, closing its doors sometime in 2008. And, of course, there are some families of Hershey workers who have family members that work for Rideau Regional, so the town is going to be devasted over the next few years.

Dairy Farmers of Ontario, the marketing group representing Ontario dairy farmers, reported recently that they supply 39 million litres of milk (1.5% of the 2.6 billion litres produced in Ontario every year) to the factory in Smiths Falls. The factory pays a highly discounted rate of 30 cents/litre and apparently have never raised cost as an issue with the DFO. If they move some of the operations to Mexico, as some people think will happen, it’s unlikely that they’ll get a better milk price. Because DFO pools all the milk produced by its members, the losses will be distributed evenly to all the milk producers so no local farmers will suddenly find themselves with milk they can’t sell.

The Premier of Ontario has apparently spoken to the CEO of Hershey’s to see if there’s anything the province can do to convince the company to leave the plant open. From what was reported on CBC radio, the discussion doesn’t appear to have made a difference.

It’s puzzling that the factory will close given that it does turn a profit. According to CBC, the closure is part of a global restructuring program that will see the loss of 1500 jobs worldwide.

An online petition has been set up to try to convince the company to change its mind. It can be found at http://www.petitiononline.com/hershsf/petition.html. I encourage you to sign it, if for no other reason than the one a co-worker who lives in Smiths Falls put forward: “who doesn’t like cheap chocolate?”