Friday, December 21, 2007

New TimeZone in Argentina

We in Argentina are changing Timezone soon, and it is a good idea to consume lower energy, the energy problem is worldwide, not only from here... Ok, what comes to question is the problem that our Linux machines will have if the timezone changes. Here i explain how to "hack" the timezone, until the people that maintains the global timezone files do update them...

Download the newest timezone file:
wget ftp://elsie.nci.nih.gov/pub/tzdata2007k.tar.gz
unzip and untar it in a directory like /tmp

--- This is no more needed since the new Timezone has the changes -----
Edit the file called "southamerica"
Look at the lines that say:
# Buenos Aires (BA), Capital Federal (CF),
Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May # Cordoba Mean Time
-4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART

At the end of the block it should look like this:
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2007 Dec 30
-2:00 Arg ART 2008 Mar 16
-3:00 Arg ART

------ End -------
The new Timezone has the changes already done, so just do this:

zic southamerica

rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Argentina/Buenos_Aires /etc/localtime


That would do the trick.

7 comentarios:

Anonymous said...

Hola.

Si no te entendí mal, debería quedar:

# Buenos Aires (BA), Capital Federal (CF),
Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May # Cordoba Mean Time
-4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2007 Dec 30
-2:00 Arg ART 2008 Mar 16
-3:00 Arg ART


(O sea: se borra el "-3:00 - ART" del bloque original y se lo reemplaza por las tres líneas que puse en negrita?)

Mil gracias,
Norberto

Walter Lamagna said...

Si, exactamente, he modificado el post ya que tu duda puede ser la de otro ;)

Saludos

Anonymous said...

che no te faltaria una liena que diga

Rule Arg 2007 only - Dec Sun>=1 0:00 1:00 S

saludos

ale

Walter Lamagna said...

Lo probe y andubo solamente con la linea que escribi. No lo probe con la linea que sugeris.

Anonymous said...

Worked perfectly at my Slack 12.0 box. Thanks a lot!!

Diego Gutierrez

Brad said...

ftp://elsie.nci.nih.gov/pub/tzdata2007k.tar.gz
Already has the changes needed for the new time zone, and not just for Buenos Aires, but all the Argentina time zones.

Just run "tic southamerica" and don't change anything.

Walter Lamagna said...

Thanks Brad, i updated the blog entry