views:

354

answers:

3

I have just, in my groggy morning state, reversed & confused the arguments to ln, replacing /usr/share/zoneinfo/America/Toronto with a link to the non-existant /etc/localtime, when I really wanted to link /etc/localtime to Toronto. Now I have no timezone file for where I live. Does anybody have a copy or know where I could get one? It's just instructions on how to translate unix time into toronto time, but I cat'd a few of the other files, and they don't seem like something I'm up to the task of writing by hand.

I know. At least I've never rm -r'd my /

edit:

Before anybody asks, I just tried sudo dpkg-reconfigure tzdata, gleefully entered "America" then "Toronto", only to crash and read, cp: cannot stat '/usr/share/zoneinfo/America/Toronto': no such file or directory. ARGH.

+1  A: 

Depending on which GNU/Linux distro you're using, you may be able to just re-download the whole of the tzdata package using its package manager. I know ArchLinux has a package for the time zone data and so does Debian.

However, you can also manually download the whole package and extract the time zone file that you want.

omouse
Hmmm. It seems those files are human readable script of some type, while the files on my computer are probably binaries, as cat rendered them as a bunch of bizarre characters. My aptitude can't find tzdata either. Hmmm :\
nullpointer
Yeah, you missed a step from the website (I did too hehe):The code lets you compile the tz source files into machine-readable binary files, one for each location. It also lets you read a tz binary file and interpret time stamps for that location.So you use the tzcode stuff to compile the tzdata stuff. You'll want to read the README file that comes with it to figure out how to dump the exact timezone data that you want.
omouse
thank you anyhow.
nullpointer
+1  A: 

http://www.246tnt.com/files/Toronto

246tNt
I'll give this a try.
nullpointer
+1  A: 

apt-get install --reinstall tzdata

Ken Bloom