56bf9cf275ec64c72fca605b5493ec8dd18cd377 |
06-Apr-2018 |
Neil Fuller <nfuller@google.com> |
More tweaks to tzlookup.xml This change is to allow for more meaningful priorities for zones in countryzones.txt. The exact meaning of priority is left abstract since different countries have different zone naming schemes assigned to them. The priorities were orginally intended to be abstract and just to influence priorities between individual nodes in subtrees but this is going to be difficult to maintain and error prone for large countries. For large countries it will make sense to relate priority to some metric associated with the zone, usually population. This has now been done for the larger countries. This highlighted a few issues with Brazil where the city population had incorrectly been used instead of a state population when previously choosing priority. The only change users would see is that Brazil will now show Ciuaba instead of Campo Grande. Included are some improvements to the host code: improvements to the visualization debugging tool to add more information to the graphviz output and removal of unused imports. As always, files are generated by update-tzdata.py in system/timezone. Test: make droid / make tzlookup_generator / inspection Bug: 77227594 Merged-In: I1836f908ee0a67406731bb01525ffde7c9448838 Change-Id: I1836f908ee0a67406731bb01525ffde7c9448838 (cherry picked from commit f40c096fc0fb63e498bc0ee53bc1807bdfb2e510)
onetree/CountryZoneTreeTest.java
|
181282f9128922e72b0b7091a1ffe54d23e0a896 |
28-Mar-2018 |
Neil Fuller <nfuller@google.com> |
Remove more zones by improving algorithm The zone tree algorithm that is used to generate tzlookup.xml was not eliminating zones that have a long period of no-DST until the specified end time. This change improves the algorithm and thereby will reduce the number of (unnecessarily) selectable zones in the new time zone picker. This is a desirable change. The new picker removes some zones that were present in the old picker (not all removed as part of this change). These are: (br) America/Recife - Bahia used instead, and Fortaleza also has a higher priority. Bahia as been the same as Recife since 2012-02-26T02:00:00Z and has a much larger population. Fortaleza has been the same as Recife since 2000-10-22T02:00:00Z and has a higher city population (but not if the area is expanded to the state). (ru) Asia/Yakutsk - Chita used instead. Has been the same as Yakutsk since 2016-03-26T18:00:00Z, Chita has a larger population. (au) Australia/Hobart - Sydney is available instead, and they have been the same since 2007-10-27T16:00:00Z This change removes the following zones from the new picker that were previously visible only in the new picker: (ar) America/Argentina/Mendoza - Same as America/Argentina/Buenos_Aires since 2009-03-15T02:00:00Z (au) Australia/Lindeman - Same a Brisbane since 1994-03-05T16:00:00Z (br) America/Belem - Same as America/Fortaleza since 2002-02-17T02:00:00Z (br) America/Fortaleza - Same as America/Bahia since 2012-02-26T02:00:00Z (br) America/Araguaina - Same as America/Bahia since 2013-02-17T02:00:00Z (br) America/Santarem - Same as America/Fortaleza since 2008-06-24T04:00:00Z (br) America/Porto_Velho - Same as America/Manaus since 1994-02-20T03:00:00Z (br) America/Boa_Vista - Same as America/Manaus since 2000-10-15T03:00:00Z (ca) America/Swift_Current - Same as America/Regina since 1972-04-30T09:00:00Z (ca) America/Creston - Same as America/Dawson_Creek since 1972-08-30T09:00:00Z (ca) America/Fort_Nelson - Same as America/Dawson_Creek since 2015-03-08T10:00:00Z (id) Asia/Pontianak - Same as Asia/Jakarta since 1987-12-31T16:00:00Z (kz) Asia/Qyzylorda - Same as Asia/Almaty since 2004-10-30T21:00:00Z (mh) Pacific/Kwajalein - Same as Pacific/Majuro since 1993-08-20T12:00:00Z (my) Asia/Kuching - Same as Asia/Kuala_Lumpur since 1981-12-31T16:30:00Z (ru) Asia/Yakutsk - Same as Asia/Chita since 2016-03-26T18:00:00Z (ru) Asia/Novokuznetsk - Same as Asia/Krasnoyarsk since 2016-03-26T20:00:00Z (ru) Asia/Tomsk - Same as Asia/Barnaul since 2016-05-28T20:00:00Z (ru) Europe/Ulyanovsk - Same as Europe/Saratov since 2016-12-03T23:00:00Z Other changes exist to "notafter" times but these should have no effect on the new picker since they are all in the past. Bug: 77227594 Test: Ran tzlookup_generator tests Test: Visual inspection in the picker Merged-In: I0d2f32ae8c7cbb8e604962096b905940d27af414 Change-Id: I0d2f32ae8c7cbb8e604962096b905940d27af414 (cherry picked from commit 5f05dc20eba62dced6bdac5bac75ecaa60263b7b)
zLookupGeneratorTest.java
onetree/CountryZoneTreeTest.java
onetree/ZoneInfoTest.java
onetree/ZoneOffsetPeriodTest.java
|
ffc430367ab3e24195476dc6499ea939b67d31f6 |
19-Mar-2018 |
Neil Fuller <nfuller@google.com> |
Tests and tidy up for the zonetrees code Some logic has been tidied up, methods renamed and responsibilities moved to enable easier testing. The tests revealed a bug that caused the first time zone transition after 1970 to be skipped so this has been fixed and the tzlookup.xml file regenerated with update-tzdata.py. Bug: 72142943 Test: ran all tests, see tzlookup_generator/README.android Test: ran update-tzdata.py and looked at tzlookup.xml Merged-In: Ia344cee9fe19628d798c055d01c776a5f8e0e272 Change-Id: Ia344cee9fe19628d798c055d01c776a5f8e0e272 (cherry picked from commit 0d8c2e75de6c30a5aa899b2c21f3e7cf9f1d2397)
onetree/CountryZoneTreeTest.java
onetree/CountryZoneUsageTest.java
onetree/TreeNodeTest.java
onetree/ZoneInfoTest.java
onetree/ZoneOffsetPeriodTest.java
|
1926bcbbf6843851f313c88c09f495b25bfacab0 |
09-Mar-2018 |
Neil Fuller <nfuller@google.com> |
Annotating zones that are not strictly necessary. This change adds a host-side code to help reduce the number of zones considered for a new time zone picker. The TzLookupGenerator will now output additional "notafter" attributes for zones that do not need to be considered after a point in time. The tool relies on data from ICU to establish zone rules / naming information and the priority information held in countryzones.txt. When two or more zones are effectively identical for a period the priority is used to decide which zone should carry forward and which zone should have "notafter" added. Also included is a tool (UniqueZonesVisualizer) to help debugging problems with zone prioritization with tools like "dot". This change contains an integration test for TzLookupGenerator. zonetree classes are currently lacking unit tests. This will be resolved in a follow up commit when time allows. Bug: 72142943 Test: Visual inspection of tzlookup.xml Test: Ran tzlookup_generator/ tests, see README.android Change-Id: I37568bc923bcaadb8b1305eec5dc1fea2ae3012b Merged-In: I37568bc923bcaadb8b1305eec5dc1fea2ae3012b (cherry picked from commit 73638ad4eebd581d3b96c7f6a7e0fad2e23bae7d)
zLookupGeneratorTest.java
|
8c74627148c0c6a399b104a31a75d15980ad64f2 |
15-Mar-2018 |
Neil Fuller <nfuller@google.com> |
Refactoring to support an upcoming change Making various changes to support a large upcoming commit. Most of the changes are in TzLookupGenerator to split up a large method that is only going to get larger. Bug: 72142943 Test: Ran unit tests (see tzlookup_generator/README.android) Test: Ran update-tzdata.py, tzlookup.xml had not changed Merged-In: Ia10992c8f83eee9d619f77e4a18ecf8612f2e384 Change-Id: Ia10992c8f83eee9d619f77e4a18ecf8612f2e384 (cherry picked from commit 5b1ab665792824c4ea75bf6584d42dca206c803c)
rrorsTest.java
|
dbeeaefea8035cd3fd0eec96c967b1d7fc0c1c22 |
27-Feb-2018 |
Neil Fuller <nfuller@google.com> |
Update countryzones.txt / tests to new proto defn The format was modified in commit fc88022377acb94c0a8a59893b2ee690b8cb4580 but the countryzones.txt was omitted from the commit by mistake. This change also updates the associated host unit tests. Bug: 72144448 Test: manual: ran update-tzdata.py Change-Id: Ic7ac6f5fe7cc7bd4061b426e259279d0b6b73362
zLookupGeneratorTest.java
|
e86350ffdba93e116f2a94ea09c7fae214179d8e |
05-Jan-2018 |
Neil Fuller <nfuller@google.com> |
Add hint data for whether a country uses UTC Most country codes do not use UTC and working that out on the fly on device is inefficient: some of the countries that don't use UTC have many zone that need to be loaded and checked (e.g. US, RU, CA, BR). This hint allows that to be side-stepped. Most of the zones that do use UTC only have a small number of time zones to check on device. The data will be used in a future commit to support telephony time zone detection usecases. For reference the country codes that use UTC ever are: aq, bf, ci, eh, es, fo, gb, gg, gh, gl, gm, gn, gw, ie, im, is, je, lr, ma, ml, mr, pt, sh, sl, sn, st, tg The list it will replace is hardcoded in telephony code (NitzStateMachine, originally ServiceStateTracker): bf, ci, eh, fo, gb, gh, gm, gn, gw, ie, lr, is, ma, ml, mr, pt, sl, sn, st, tg [Note the second list was supposed to be sorted but wasn't because of lr being in the wrong place so may not have been used in all cases]. All entries present in the old list are in the new list. The new entries reflect country codes that probably aren't used by phone networks or havea single time zone except for: es - Spain, because of the Canary Islands in Winter gl - Greenland, Ittoqqortoormiit and Ittoqqortoormiit The new data is inarguably correct but it's hard to tell how many users would be affected. The information is currently only used to detect the presence of bogus NITZ signals so it's possible that Spain / Greenland will not detect / correct for bogus NITZ after this data is used but might have done so before. Test: Ran TzLookupGeneratorTest Bug: 37494871 Change-Id: Ieef8e92a11cb8371c42a6d98925e62141c61e02f
zLookupGeneratorTest.java
|
8cec561a92ae3675ae6a6a0ff932860f29a43a78 |
11-Oct-2017 |
Neil Fuller <nfuller@google.com> |
Generate the tzlookup.xml file from a proto file This commit adds a platform developer command-line tool to generate the tzlookup.xml from a human-readable .proto file rather than just copying the .xml file around. The only files that influence on-device behavior are those in system/timezone/output_data. The new countryzones.txt is a translation of the old tzlookup.xml with more structure and some additional data. A few offsets were found to be incorrect by the new validation code and these have been corrected (this information was previously found in comments in tzlookup.xml and was never actually used on device). During generation the tzlookup_generator can validate the input against IANA and ICU data and do some defaulting which should help avoid the data becoming out of date. This change introduces a country-level attribute to the tzlookup.xml for the "country default" time zone, which is there to help address bug 34266809 in a follow-up change. This change also moves the zone_compactor tool to being built with the Android build system for consistency. The change updates the update-tzdata.py script to use the new tool. The updated output_data files from running the tool are included in this commit. The new tool has tests instructions for execution are in README.android. Bug: 34266809 Bug: 65575839 Test: Booted device Test: See included host tests. Change-Id: Ic96af7987c61690faebbc80907209f9e1cc1e976 Merged-In: Ic96af7987c61690faebbc80907209f9e1cc1e976 (cherry picked from commit 2f3a32b91c23523450c3d1abde303447e9a6d17b)
rrorsTest.java
estUtils.java
zLookupGeneratorTest.java
tilsTest.java
oneTabFileTest.java
|