If you live in a country with batshit crazy, constantly changing DST rules, you may find that your device gets the wrong timezone and the date/time is messed up.
This a quick and very dirty guide to fix the problem.
WARNING: If you brick your phone, don't bother me !
You need the following :
- ADB installed and working
- A JDK (java development kit NOT a JRE)
- GIT
- A rooted android device, with /system mounted read and write (how to do that is beyond the scope of this guide)
Android uses the traditional "Olson" timezone database storing the information and an index file in the /system/usr/share/zoneinfo directory, after reading the bionic libc source code, I found no clean unintrusive way to perform the needed update other than with a big hammer aka. "overwrite system files" .
- # git clone git://github.com/android/platform_development.git
- # cd tools/zoneinfo
- open script "generate" in the first line edit the variable version to match the most up to date timezone database version, currently tzdata2011k
- Around line 35, you will find "cp zoneinfo.dat zoneinfo.idx ../../../bionic/libc/zoneinfo", update it to match the desired target directory or comment it.
- Download the latest version of tzdata.
- create a directory named accordingly to the "version" variable and extract the files there.
- run ./generate you should get three files named zoneinfo.dat zoneinfo.idx and zoneinfo.version copy those files to your SD card
- Open ADB and copy them to the /system/usr/share/zoneinfo directory
- Ensure that zoneinfo.* files in /system/usr/share/zoneinfo are owned by root with permissions 0644.
- run sync and reboot in adb console.
After this process you should be able to select a correct/updated timezone definition from the date and time menu.