xref: /aosp_15_r20/system/timezone/debug_tools/host/README.android (revision 2fd832c65f8b41db7ddb4ac802b9196762fe4888)
1*2fd832c6SAndroid Build Coastguard WorkerThis directory contains tooling to help when debugging time zone issues on
2*2fd832c6SAndroid Build Coastguard WorkerAndroid.
3*2fd832c6SAndroid Build Coastguard Worker
4*2fd832c6SAndroid Build Coastguard Workerdump-tzdata.py
5*2fd832c6SAndroid Build Coastguard Worker - A tool that takes a tzdata file and splits it into component tzfiles,
6*2fd832c6SAndroid Build Coastguard Worker   zone.tab, etc. Run it with --help for usage. The individual tzfiles can
7*2fd832c6SAndroid Build Coastguard Worker   be inspected with tools like zdump, for example with "zdump -V <tzfile>"
8*2fd832c6SAndroid Build Coastguard Worker
9*2fd832c6SAndroid Build Coastguard Worker   It also dumps human-readable CSV files of the (v1) content currently used by
10*2fd832c6SAndroid Build Coastguard Worker   Android's ZoneInfo class. These can be inspected and compared with dumps from
11*2fd832c6SAndroid Build Coastguard Worker   other tzdata files easily using your favourite text diffing tool.
12*2fd832c6SAndroid Build Coastguard Worker
13*2fd832c6SAndroid Build Coastguard Workervisualize_zone_trees.py
14*2fd832c6SAndroid Build Coastguard Worker  - A tool that visualizes time zones, specifically when time zones "sync up"
15*2fd832c6SAndroid Build Coastguard Worker    (i.e. stop being distinct). Time zone IDs are created in the tzdb whenever
16*2fd832c6SAndroid Build Coastguard Worker    there is a distinction between time zones, e.g. if a sub-region moved
17*2fd832c6SAndroid Build Coastguard Worker    from being the same as one major region to be the same as a different major
18*2fd832c6SAndroid Build Coastguard Worker    region, then a new time zone ID is required to represent the sub-region's
19*2fd832c6SAndroid Build Coastguard Worker    behavior because neither of the IDs for the major region describe the time
20*2fd832c6SAndroid Build Coastguard Worker    zone behavior of the sub-region throughout time. Once created, zone IDs
21*2fd832c6SAndroid Build Coastguard Worker    persist in the tzdb forever. Zone trees are used to determine if zone IDs
22*2fd832c6SAndroid Build Coastguard Worker    are still needed in order to represent relevant distinctions, e.g. does
23*2fd832c6SAndroid Build Coastguard Worker    Android still need to offer a choice between two zones that will be the
24*2fd832c6SAndroid Build Coastguard Worker    same from time X until the end of time? If the answer is no, one of the
25*2fd832c6SAndroid Build Coastguard Worker    zones can be used / shown to users and the other need not be.
26