7

I have an iPod touch (2nd gen) running iOS 3.1.3 (since it won't perform well with iOS 4) and constant troubles with the clock setting itself one hour ahead of the actual time when I connect it to the computer.

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 already 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.
Both zic and zdump are present on the device, which leads me to believe it can be done via SSH and UNIX commands.

7

I found the solution here.

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

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

  2. SSH into the iPod and copy 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, compile it with the command: zic southamerica, which takes a few seconds.

  4. Then, use the following command to copy this file:

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

  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.

Edit: 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.

  • 2
    Step 4 copies the America/Argentina/Buenos_Aires file into the America/ directory. (Notice that it's not America/Argentina/.) – a CVn 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
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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