On 2020-03-21 16:24, Paul Eggert wrote:
On 3/21/20 2:08 PM, Brian Inglis wrote:
This appears to be the process doc: https://source.android.com/devices/tech/config/timezone-rules and this appears to be the main code: https://android.googlesource.com/platform/system/timezone/+/refs/heads/maste...
Thanks for the links. They talk about how TZif files are assembled together into a single tzdata file. However, as I vaguely recall the Android folks modified zic to generate 32-bit only TZif files. I don't offhand know whether that is still true, or how to verify whether it's true. Perhaps it was true long ago but became false when Android started supporting 64-bit CPUs; a bit of Googling suggests this occurred with Android 5.0 Lollipop (2014).
At linked code line 53: https://android.googlesource.com/platform/system/timezone/+/refs/heads/maste... def GenerateZicInputFile(extracted_iana_data_dir): # Android APIs assume DST means "summer time" so we follow the rearguard format # introduced in 2018e. zic_input_file_name = 'rearguard.zi' [now appears rearguard.zi is the only input] # 'NDATA=' is used to remove unnecessary rules files. subprocess.check_call(['make', '-C', extracted_iana_data_dir, 'NDATA=', zic_input_file_name]) At linked code line 134: https://android.googlesource.com/platform/system/timezone/+/refs/heads/maste... [everything is untarred to a zic build dir and make built] zic_build_dir = '%s/zic' % tmp_dir ExtractTarFile(iana_zic_code_tar_file, zic_build_dir) ExtractTarFile(iana_zic_data_tar_file, zic_build_dir) # zic print('Building zic...') # VERSION_DEPS= is to stop the build process looking for files that might not # be present across different versions. subprocess.check_call(['make', '-C', zic_build_dir, 'zic']) zic_binary_file = '%s/zic' % zic_build_dir ... print('Generating zic input file...') zic_input_file = GenerateZicInputFile(extracted_iana_data_dir) print('Calling zic...') zic_output_dir = '%s/data' % tmp_dir os.mkdir(zic_output_dir) [everything is generated from rearguard] zic_cmd = [zic_binary_file, '-d', zic_output_dir, zic_input_file] -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.