Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an iPod touch (2nd gen) and constant troubles with the clock setting itself one hour ahead of the actual time when I connect it to the computer.

long story short, When I SSH into the device:

  • date "+%Z" returns ARST which is correct (I'm in Buenos Aires, Argentina)
  • date "+%z" the result is -0200, which is wrong and should be -0300

My question is: How do I correct the offset of my timezone to the real value?

I have found mentions of zic, zdump and references to a "IANA Time Zone Database".
I've tried to find allready compiled files in order to replace the whole "zoneinfo" folder, but the downloads I could find seem to use a different folder structure than the one on the iPod.

edit: I am looking for a way to edit or update the timezone information, so that my timezone "ARST" is configured correctly. I have found several references to a compiler named zic, but need help in order to work out a solution.
Both zic and zdump are present on the device, which leads me to believe it can be done via SSH and UNIX-commands.

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

OK, I have stumbled upon the solution.
Here's the link where I got the info from: http://brickybox.com/2009/10/18/os-x-fix-argentina-dst-october-2009

The tzdata source has changed its url. It is now to be found at: ftp://ftp.iana.org/tz/ or http://www.iana.org/time-zones for more information.

  1. I downloaded the updated tzdata-file: in this case tzdata2012j.tar.gz and extracted it to a temporary folder.

  2. Then I SSHed into the iPod and copied the extracted files to the iPod. I chose User/Downloads and created a new (temporary) folder tzfix into which I copied everything.

  3. after that came the zic compile: zic southamerica, which took a few short seconds

  4. then

    cp /usr/share/zoneinfo/America/Argentina/Buenos_Aires /usr/share/zoneinfo/America/Buenos_Aires

    I don't understand what this realy does. Copy, and overwrite, the file with itself?

  5. testing date "+%z" and date "+%Z" both return correct values, now: -0300 and ART

Finally! I can set the clock to the correct time without twitter refusing to login and Google authenticator throwing wrong auth codes.

share|improve this answer
1  
Step 4 copies the America/Argentina/Buenos_Aires file into the America/ directory. (Notice that it's not America/Argentina/.) –  Michael Kjörling Jan 28 '13 at 8:41
    
Ah! Thanks @MichaelKjörling That clears it up nicely. It completely escaped my attention. –  leugim Jan 28 '13 at 16:02
    
Aren't there updated packages available for iOS? That is preferrable to hacking in a file from sources. –  vonbrand Jan 28 '13 at 16:09
    
@vonbrand: That was my first approach, searching for a solution. I couldn't find any updated packages. The only options seems to be "update to the newest iOS". My iPod won't perform well with iOS4, so I'm stuck with 3.1.3. I did not find a way to update only certain packages. Something I am learning to appreciate from fooling around with Ubuntu. –  leugim Jan 28 '13 at 19:34
    
Also, and I did not include it in the answer because I suspect it to be offtopic, there is another separate database for the time which needs to be updated: the ICU database. It uses the same tzdata and needs to be compiled into /usr/share/icu/icudt40l.dat. This is necessary so that the clock and calendar apps show the correct time. –  leugim Jan 28 '13 at 19:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.