BenV's notes

Slackware timezone fuckup

by on Aug.07, 2009, under Software

Messing around on one of my machines I checked a timestamp on a file…. and noticed “Huh, didn’t I just touch it?”.
ls told me the file was about 12 hours old. Interesting, since it was just created.

# date
Fri Aug 7 10:08:09 CDT 2009

What the…. CDT ? When did we move? 😉

# ls -la /etc/*time*
lrwxrwxrwx 1 root root 36 2008-03-14 04:42 /etc/localtime -> /usr/share/zoneinfo/Europe/Amsterdam

Well, not recently… that’s for sure.

Note that this box is running an ancient slackware version – 11.0. I keep it up2date regarding security issues using slackpkg and half the stuff running on it is built by myself anyway.
And so I realized that glibc-zoneinfo was recently upgraded to version 2.3.6. Ah yeah…. and so we suddenly moved.
Checking another box that had the same update a few days ago I found it had the same problem. Joy.

I see 2 solutions, except for “wait for the slackware fix”.

  • # rm -f /etc/localtime
    ln -s /usr/share/zoneinfo/CET /etc/localtime
  • # rm -f /etc/localtime
    ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime

(of course there are plenty more solutions, like recompile glibc, but I’m not in the mood for that).

For testing timezones, you can use this:

# TZ=Europe/Dublin date
Fri Aug 7 16:18:00 IST 2009

Or for figuring out what zone a timezone file is:

# strings /etc/localtime | grep ST
CST6CDT,M3.2.0,M11.1.0




:,

Leave a Reply

You must be logged in to post a comment.

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)