eriksmartt.com>Selected Archives

Manually fixing Ubuntu Edgy timezone file (my laptop didn't update)

Even though most articles indicate that Ubuntu Edgy should have automatically patched itself with updated timezone files, my laptop (and apparently a few others didn't get the update either.) With some googling, I found plenty of suggestions (including "sorry, mine worked", and "just manually set your clock") but none got to the core issue, which is that the timezone files themselves were wrong.

No doubt, by now, you know whether your machine updated correctly; but if it didn't, you can verify your timezone files with this:

zdump -v /etc/localtime | grep 2007

If you see "April 1" in there, the machine has old files (as mine did.)

The solution (for me) was to manually rebuild the timezone files (since the system thought it was fully patched.) Step 1: Go here: http://packages.ubuntu.com/edgy/libs/tzdata and download the latest file (for me, it was http://archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2006m.orig.tar.gz.)

Put the file somewhere (like /tmp/) 'cd' there, and un-tar it all. 'cd' into the uncompressed files until you find a file called 'northamerica'. Now compile the timezone file like this:

sudo zic northamerica

Remove your previous file:

sudo rm /etc/localtime

And sym-link to the new one:

sudo ln -sf /usr/share/zoneinfo/CST6CDT /etc/localtime (substituting CST6CDT for your timezone.)

Now verify with:

zdump -v /etc/localtime | grep 2007

It should now read "Mar 11" and "Nov 4" instead of "April 1" and "Oct 28", and the machine should fix it's clock shortly (it just took a few minutes for mine to correct itself.)

I have no idea what the long-term effects may be of having manually fixed this (as in, what happens when I update to Feisty Fawn) but for now, all is good with the system clock.